aboutsummaryrefslogtreecommitdiff
path: root/gcc/hwint.h
diff options
context:
space:
mode:
authorAlexandre Oliva <aoliva@redhat.com>2001-05-03 11:58:43 +0000
committerAlexandre Oliva <aoliva@gcc.gnu.org>2001-05-03 11:58:43 +0000
commit4abe9f62d8d9c0dee7811768d2ac73ce70c064fd (patch)
tree5c4bb74bc6728fbc513bb95f9016ed1335ef7f3f /gcc/hwint.h
parent5158d7eeb777a402440950ee9f3a5ce69586e791 (diff)
downloadgcc-4abe9f62d8d9c0dee7811768d2ac73ce70c064fd.zip
gcc-4abe9f62d8d9c0dee7811768d2ac73ce70c064fd.tar.gz
gcc-4abe9f62d8d9c0dee7811768d2ac73ce70c064fd.tar.bz2
Re-installed 2001-01-09's patch:
* 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. From-SVN: r41785
Diffstat (limited to 'gcc/hwint.h')
-rw-r--r--gcc/hwint.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/gcc/hwint.h b/gcc/hwint.h
index e4ec51c..9551dc5 100644
--- a/gcc/hwint.h
+++ b/gcc/hwint.h
@@ -27,6 +27,29 @@
/* 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