Is it possible for a macro to tell file/namespace scope from other scopes?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
On the subject of the difference in behavior in #pragma GCC diagnostic
before 4.6 when they had to be at file/namespace scope, and 4.6 and
later when they could be included at any scope, is there any way to
determine if you are or are not at file/namespace scope in a test from a
preprocessor macro? I'm guessing not, but if there was it could make
for a beautiful solution to using these things, in that you could have
GCC_DIAG_ON/OFF(x) macros that would have appropriate implementations
for appropriate scopes automagically. So, anyone able to dispel my
preconceptions and tell me it's possible?
Patrick
[Index of Archives]
[Linux C Programming]
[Linux Kernel]
[eCos]
[Fedora Development]
[Fedora Announce]
[Autoconf]
[The DWARVES Debugging Tools]
[Yosemite Campsites]
[Yosemite News]
[Linux GCC]