Preprocessor bug in MacOS ?

Alexandre Oliva aoliva@redhat.com
Mon Oct 20 17:38:00 GMT 2003


On Oct 20, 2003, Mihnea Balta <dark_lkml@mymail.ro> wrote:

>   My guess is that the stuff you're concatenating must be single
>   tokens

Well, not really, but it will only concatenate the last token before
## with the first token after ##.  1_2 is not a single token, it's 2
tokens: `1' and `_2'.  Ditto for `0_1'.  So you're actually
concatenating `_1' and `1'.  To prevent accidental token pasting with
other tokens, a blank is inserted.  This is perfectly correct
behavior.  It would be nice if Apple would contribute this fix to FSF
GCC.  It's definitely not in the latest release of GCC.

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                 aoliva@{redhat.com, gcc.gnu.org}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist                Professional serial bug killer



More information about the Gcc-help mailing list