This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug preprocessor/37549] gcc -E -dD prints predefined macros, contrary to docs



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]