This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
#if does not work!
- From: Unga <unga888 at yahoo dot com>
- To: gcc-help at gcc dot gnu dot org
- Date: Sat, 21 Jun 2008 01:54:38 -0700 (PDT)
- Subject: #if does not work!
- Reply-to: unga888 at yahoo dot com
Hi all
I'm using the gcc 4.3.1 on FreeBSD 7.0. The following #if block does not work as expected:
#if LDBL_MANT_DIG == 64
static const long double split = 0x1p32L + 1.0;
#elif LDBL_MANT_DIG == 113
static const long double split = 0x1p57L + 1.0;
#endif
Where the LDBL_MANT_DIG is defined as 64 as a #define on a separate include file. The compiler finds the variable split is not declared. It does not complain the include file is not found, therefore, I presume include file is found and included.
Is this a known issue? Is it possible to rewrite the code so that compiler can work properly.
Regards
Unga