Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
winocm
5 months ago
|
parent
|
context
|
favorite
| on:
Recursive macros in C, demystified (once the ugly ...
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
5 months ago
[–]
Doesn't this trigger warnings?
joriatsy
5 months ago
|
parent
[–]
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)
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: