#if does not work!

Unga unga888@yahoo.com
Sat Jun 21 08:55:00 GMT 2008


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


      



More information about the Gcc-help mailing list