This is the mail archive of the gcc-help@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]

Re: custom compiler warnings


Hi Antonio,

You can use this GCC-ism:

#pragma GCC poison foo

When foo is used, the compiler will complain.  It doesn't allow you to provide additional output text, though.  I think that would be a nice enhancement...

#pragma GCC poison foo "use bar() instead"

And I'm not sure if this #pragma GCC poison facility plays nice with C++ namespaces.

HTH,
--Eljay


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