Y
Hacker News
new
|
ask
|
show
|
jobs
by
winocm
218 days 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...
1 comments
pwdisswordfishy
218 days ago
Doesn't this trigger warnings?
link
joriatsy
218 days ago
Function 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)
link