[Bug preprocessor/37549] gcc -E -dD prints predefined macros, contrary to docs
martinrb at google dot com
gcc-bugzilla@gcc.gnu.org
Wed Sep 17 04:28:00 GMT 2008
------- Comment #2 from martinrb at google dot com 2008-09-17 04:27 -------
I tried to check how -dM and -dD treats macros defined on the command line
and in the source file:
(martinrb@spraggett) ~/src/toy $ cat foo.c
#define FOO 1
(martinrb@spraggett) ~/src/toy $ gcc -E -dM -x c -DBAR=1 foo.c | sort >/tmp/t1
(martinrb@spraggett) ~/src/toy $ gcc -E -dD -x c -DBAR=1 foo.c | sort >/tmp/t2
(martinrb@spraggett) ~/src/toy $ diff /tmp/t[12]
0a1,4
> # 1 "<built-in>"
> # 1 "<command-line>"
> # 1 "foo.c"
> # 1 "foo.c"
=> No difference in the treatment of various classes of macros.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37549
More information about the Gcc-bugs
mailing list