I'd like to add some macros to ease (un)setting a specific warning around routines that we are deprecating internally.
I'd like to turn this:
#pragma clang diagnostic push
#pragma clang diagnostic warning "-Wdeprecated-declarations"
void Foo() __attribute__((deprecated("Warning: deprecated routine")))
#pragma clang diagnostic pop
into this:
MY_DEPRECATED_BEGIN
void Foo() MY_DEPRECATED
MY_DEPRECATED_END
The MY_DEPRECATED_BEGIN
macro is giving me trouble as I have to specify two pragmas in a single macro. Can this be done?
(Bonus points for a solution that achieves the same effect using only the MY_DEPRECATED macro!)