7 ms·
Mildly related, sort of, one can prevent expansion of variadic macros as follows: #define printf(...) int (printf)(const char *, ...); I keep on seeing
by winocm 11mo ago
Mildly related, sort of, one can prevent expansion of variadic macros as follows:
#define printf(...)
int (printf)(const char *, ...);
I keep on seeing many random code bases just resort to #undef instead...
- pwdisswordfishy 11mo agoDoesn't this trigger warnings?
- joriatsy 11mo agoFunction like macros literally requires name( , i.e name followed directly by open paren, otherwise no macro substitution occurs. so (name)() will always suppress function like macros (but not non-function ones, i.e regular #define name xxx)