Preprocessor bug in MacOS ?

Segher Boessenkool segher@kernel.crashing.org
Mon Oct 20 17:48:00 GMT 2003


Pat Bohrer wrote:
> #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)
> 
> }

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

0_1 is not a valid preprocessing token, because it starts with
a numeral.  It actually is two pp tokens, namely 0 and _1 .


Segher



More information about the Gcc-help mailing list