diff options
author | mmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-04-12 22:08:32 +0000 |
---|---|---|
committer | mmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-04-12 22:08:32 +0000 |
commit | 4f15a1a4672798384e246b4af3df4cca545bba67 (patch) | |
tree | 2ae504567fbf7119524a231d95635ef563c53bce /gcc/f/com.h | |
parent | 2c8db4fe9c5a484bf1a6ab4d51aba82a66d3a2d9 (diff) | |
download | ppe42-gcc-4f15a1a4672798384e246b4af3df4cca545bba67.tar.gz ppe42-gcc-4f15a1a4672798384e246b4af3df4cca545bba67.zip |
* com.h (FFECOM_f2cINTEGER): Avoid using LONG_TYPE_SIZE as a
preprocessor constant.
(FFECOM_f2cLOGICAL): Likewise.
(FFECOM_f2cLONGINT): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@33130 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/f/com.h')
-rw-r--r-- | gcc/f/com.h | 34 |
1 files changed, 16 insertions, 18 deletions
diff --git a/gcc/f/com.h b/gcc/f/com.h index 99c5503cdb9..2bb118b1492 100644 --- a/gcc/f/com.h +++ b/gcc/f/com.h @@ -1,5 +1,5 @@ /* com.h -- Public #include File (module.h template V1.0) - Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. + Copyright (C) 1995, 1996, 1997, 2000 Free Software Foundation, Inc. Contributed by James Craig Burley. This file is part of GNU Fortran. @@ -127,23 +127,21 @@ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA #define LONG_DOUBLE_TYPE_SIZE (BITS_PER_WORD * 2) #endif -#if LONG_TYPE_SIZE == FLOAT_TYPE_SIZE -# define FFECOM_f2cINTEGER FFECOM_f2ccodeLONG -# define FFECOM_f2cLOGICAL FFECOM_f2ccodeLONG -#elif INT_TYPE_SIZE == FLOAT_TYPE_SIZE -# define FFECOM_f2cINTEGER FFECOM_f2ccodeINT -# define FFECOM_f2cLOGICAL FFECOM_f2ccodeINT -#else -# error Cannot find a suitable type for FFECOM_f2cINTEGER -#endif - -#if LONG_TYPE_SIZE == (FLOAT_TYPE_SIZE * 2) -# define FFECOM_f2cLONGINT FFECOM_f2ccodeLONG -#elif LONG_LONG_TYPE_SIZE == (FLOAT_TYPE_SIZE * 2) -# define FFECOM_f2cLONGINT FFECOM_f2ccodeLONGLONG -#else -# error Cannot find a suitable type for FFECOM_f2cLONGINT -#endif +#define FFECOM_f2cINTEGER \ + (LONG_TYPE_SIZE == FLOAT_TYPE_SIZE \ + ? FFECOM_f2ccodeLONG \ + : (INT_TYPE_SIZE == FLOAT_TYPE_SIZE \ + ? FFECOM_f2ccodeINT \ + : (abort (), -1))) + +#define FFECOM_f2cLOGICAL FFECOM_f2cINTEGER + +#define FFECOM_f2cLONGINT \ + (LONG_TYPE_SIZE == (FLOAT_TYPE_SIZE * 2) \ + ? FFECOM_f2ccodeLONG \ + : (LONG_LONG_TYPE_SIZE == (FLOAT_TYPE_SIZE * 2) \ + ? FFECOM_f2ccodeLONGLONG \ + : (abort (), -1))) #define FFECOM_f2cADDRESS FFECOM_f2ccodeCHARPTR #define FFECOM_f2cSHORTINT FFECOM_f2ccodeSHORT |