#if does not work!

Andrew Haley aph@redhat.com
Sat Jun 21 09:18:00 GMT 2008


Unga wrote:
> 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.

Please reproduce this problem in a small self-contained test case, them
I'll have a look.

Andrew.



More information about the Gcc-help mailing list