How to see macros active in error messages

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

 



I was compiling a project and received an odd message that took some digging.
e.g.

file.cpp:#:#: error: expected unqualified-id before numeric constant
# | if ( inttype == MyClass::ERROR )
                             ^~~~~
where MyClass::ERROR is an enum.

Took some digging to find out ERROR was somewhere #define'd and the cure was to #undef ERROR Could never find out *where* it was defined - recursively searched all include files of the project and /usr/include etc. Regardless, it would have been very helpful to know in the error messages that a #define was active or to have the ERROR replaced by the macro substitution.

Is it possible to get any macro expansion information in error messages?
I didn't see a compiler flag for to get this information, but I might have missed it.
If not, it would be a nice feature to have.

Cheers,
Emre.




[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