Preprocessor bug in MacOS ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I was trying to build 64-bit PowerPC Linux cross compiler on MacOS-X and ran into the following build problem.
I narrowed it down to a preprocessor problem.


If I take the following code:
bash-2.05a$ cat try.c
#define CONCAT4(a,b,c,d)    (a##b##c##d)

main()
{
    CONCAT4(A,B,C,D)
    CONCAT4(A_A,B_B,C_C,D_D)
    CONCAT4(0_1,1_2,3_4,5_6)

}

and run it through the preprocessor on MacOS-X I get:

bash-2.05a$ cc -E try.c
try.c:7: illegal function call, found `_11'
try.c:7: illegal statement, missing `;' after `)'
cpp-precomp: warning: errors during smart preprocessing, retrying in basic mode
# 1 "try.c"



main ( ) { ( ABCD ) ( A_AB_BC_CD_D ) ( 0 _11 _23 _45 _6 )

}

Any ideas why spaces are being inserted between the first number separated by an '_' ?

--Pat


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux