[Bug preprocessor/51745] Strange symbol appears when using commandline definition without "="

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Jan 4 11:10:00 GMT 2012


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51745

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-01-04 11:10:07 UTC ---
The 1 comes likely from -Dfoo being equivalent to Dfoo=1 if there is no = on
the command line, and as the preprocessor internally doesn't use = signs but
spaces after macro name, we append " 1". -D"foo bar" is thus expanded as
-D"foo bar 1". "processed correctly" means what exactly?  You can't define
macro blabla(x, y) bleble[x,y], C doesn't have macros with spaces in the names.
 Garbage in garbage out in my eyes.



More information about the Gcc-bugs mailing list