How to suppress "macro redefined" warning in Objective-C

clang, llvm, macros, objective-c, warnings

Solution

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

Problem

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?

Original source