3 ms·
No need to guard #undef with #ifdef, it's a no-op if the macro is not already defined.
by tom_mellior 9y ago
No need to guard #undef with #ifdef, it's a no-op if the macro is not already defined.
- earenndil 9y agoMost compilers will warn if you #undef something not #defined.
- tom_mellior 9y agoCan you name one and explain how to call it? I can get neither GCC nor Clang to warn about the following file: #undef THIS_VARIABLE_IS_NOT_DEFINED
- earenndil 9y agoNevermind, you're right. The warning I was thinking of was redefinition.