This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug preprocessor/37549] gcc -E -dD prints predefined macros, contrary to docs
- From: "martinrb at google dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 17 Sep 2008 04:27:16 -0000
- Subject: [Bug preprocessor/37549] gcc -E -dD prints predefined macros, contrary to docs
- References: <bug-37549-16725@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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