18 Sep
2020
18 Sep
'20
1:46 a.m.
Edward Diener wrote:
I did discover that if gcc or clang is compiled at the C++03 level with -pedantic there will be a ton of warnings, and if with -pedantic-errros there will be a ton of errors for those warnings. The main culprits, for C++03 at the pedantic level, are that variadic macros are not supported and that empty macro arguments are undefined.
Note that empty arguments for __VA_ARGS__ aren't allowed by C99, so clang -pedantic warns about them even in C++20 mode (even though C++20 has __VA_OPT__.) <source>:3:4: warning: must specify at least one argument for '...' parameter of variadic macro [-Wgnu-zero-variadic-macro-arguments] clang -pedantic is way too pedantic, if you ask me.