]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
* hwint.h (HOST_BITS_PER_WIDE_INT, HOST_WIDE_INT): Use long long
authoraoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 9 Jan 2001 09:28:07 +0000 (09:28 +0000)
committeraoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 9 Jan 2001 09:28:07 +0000 (09:28 +0000)
if it's wider than long and the target's long is wider than the
host's.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@38820 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/hwint.h

index 3ea0bc36a632d78341de4b2398e9cffb8d3af223..81bb3f80b171851cb732b3f768bd0ea845775a5a 100644 (file)
@@ -1,3 +1,9 @@
+2001-01-09  Alexandre Oliva  <aoliva@redhat.com>
+
+       * hwint.h (HOST_BITS_PER_WIDE_INT, HOST_WIDE_INT): Use long long
+       if it's wider than long and the target's long is wider than the
+       host's.
+
 2001-01-09  Mark Mitchell  <mark@codesourcery.com>
 
        Remove support for using UWIN as a host machine.
index 91973b8187ae01cea740629269e34dacf38dd22e..767620af506c43e4cb42078f4894532a02891c96 100644 (file)
@@ -1,5 +1,5 @@
 /* HOST_WIDE_INT definitions for the GNU compiler.
-   Copyright (C) 1998 Free Software Foundation, Inc.
+   Copyright (C) 1998, 2001 Free Software Foundation, Inc.
 
    This file is part of GNU CC.
 
 
 /* Find the largest host integer type and set its size and type.  */
 
+/* Use long long on the host if the target has a wider long type than
+   the host.  */
+
+#if ! defined HOST_BITS_PER_WIDE_INT \
+    && defined HOST_BITS_PER_LONGLONG \
+    && (HOST_BITS_PER_LONGLONG > HOST_BITS_PER_LONG) \
+    && (defined (LONG_LONG_MAX) || defined (LONGLONG_MAX) \
+        || defined (LLONG_MAX) || defined (__GNUC__))
+
+# ifdef MAX_LONG_TYPE_SIZE
+#  if MAX_LONG_TYPE_SIZE > HOST_BITS_PER_LONG
+#   define HOST_BITS_PER_WIDE_INT HOST_BITS_PER_LONGLONG
+#   define HOST_WIDE_INT long long
+#  endif
+# else
+#  if LONG_TYPE_SIZE > HOST_BITS_PER_LONG
+#   define HOST_BITS_PER_WIDE_INT HOST_BITS_PER_LONGLONG
+#   define HOST_WIDE_INT long long
+#  endif
+# endif
+
+#endif
+
 #ifndef HOST_BITS_PER_WIDE_INT
 
 # if HOST_BITS_PER_LONG > HOST_BITS_PER_INT