Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I usually don't use those flags because some extensions are well supported (as long as I stay away from MSVC), and so I feel free to use them if they help me. One example is the ##__VAR_ARGS__ gnu extension that is not strictly c99, but not using it is just too painful for variadic macros.


C11 standardizes variadic macros โ€” see ยง6.10.3 Macro replacement http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1570.pdf


Yes, even c99 has them IIRC.

The issue that was called out, however, was the use of "FOO(x, ## __VA_ARGS__)".

GNU C has an extension that causes the ',' to be removed if __VA_ARGS__ is empty. AFAIK, it is not standard.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: