From 4f15a1a4672798384e246b4af3df4cca545bba67 Mon Sep 17 00:00:00 2001 From: mmitchel Date: Wed, 12 Apr 2000 22:08:32 +0000 Subject: * 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 --- gcc/f/com.h | 34 ++++++++++++++++------------------ 1 file changed, 16 insertions(+), 18 deletions(-) (limited to 'gcc/f/com.h') 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 -- cgit v1.2.1