I need to redefine a macro in my project and have a compile warning. I've tried
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wall"
#define SomeMacroToRedefine MyMacro
#pragma clang diagnostic pop
But it doesn't really work and I still have a warning. Any other ideas how to fix it?
You should consider using a unique identifier instead.
This warning apparently has no identifier in the Xcode 6.1 distribution.
You can #undef
prior to your definition:
#undef SomeMacroToRedefine
#define SomeMacroToRedefine MyMacro
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With