diff options
author | aoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-05-03 11:58:43 +0000 |
---|---|---|
committer | aoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-05-03 11:58:43 +0000 |
commit | 31ee5761b71a65beb449de24e8f5fa6f93c0b640 (patch) | |
tree | 5c4bb74bc6728fbc513bb95f9016ed1335ef7f3f /gcc/hwint.h | |
parent | 85a363ce903a5fc373b75daaa5759793985c93c7 (diff) | |
download | gcc-31ee5761b71a65beb449de24e8f5fa6f93c0b640.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@41785 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/hwint.h')
-rw-r--r-- | gcc/hwint.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/gcc/hwint.h b/gcc/hwint.h index e4ec51cba7a..9551dc5ccd9 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 |