diff options
author | aoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-01-09 09:28:07 +0000 |
---|---|---|
committer | aoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-01-09 09:28:07 +0000 |
commit | 69f720eca0e1cefe4d8b0b35c55de0896dfb229d (patch) | |
tree | 7c71d9ceb57a1d61ac186ec01a55bcb1a6ae39fa /gcc/hwint.h | |
parent | c84a434a65860e49392d39cb1f6482712bd6c393 (diff) | |
download | gcc-69f720eca0e1cefe4d8b0b35c55de0896dfb229d.tar.gz |
* 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@38820 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/hwint.h')
-rw-r--r-- | gcc/hwint.h | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/gcc/hwint.h b/gcc/hwint.h index 91973b8187a..767620af506 100644 --- a/gcc/hwint.h +++ b/gcc/hwint.h @@ -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. @@ -15,6 +15,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 |