Re: finding where a macro is redefined

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Trevis,

> Any suggestions for more speedily tracking this problem down?

I use the output from GCC.

For example...

: cat test.cpp
#define FOO 9
#define FOO 8

: g++ -DFOO -c test.cpp
test.cpp:1:1: warning: "FOO" redefined
<command line>:1:1: warning: this is the location of the previous definition
test.cpp:2:1: warning: "FOO" redefined
test.cpp:1:1: warning: this is the location of the previous definition

I can see that line 1 of test.cpp redefines FOO, which was previously
specified on the command line.

Also, line 2 of test.cpp redefines FOO, which was #define'd (or really,
re#define'd) previously on line 1.

HTH,
--Eljay


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux