4 ms·
In the compiler I'm working on, the only differences between selecting C11 and C17 modes are: * the value of __STDC_VERSION__ * DR423 (https://www.open-std.or
by ynik 3y ago
In the compiler I'm working on, the only differences between selecting C11 and C17 modes are:
* the value of __STDC_VERSION__
* DR423 (https://www.open-std.org/jtc1/sc22/wg14/www/docs/dr_423.htm https://www.open-std.org/jtc1/sc22/wg14/www/docs/dr_423.htm)
* DR481 (https://www.open-std.org/Jtc1/sc22/wg14/www/docs/n2001.pdf https://www.open-std.org/Jtc1/sc22/wg14/www/docs/n2001.pdf)
Note that many compilers backport defect reports to older language versions (i.e. they unconditionally adopt the new behavior independent of the -std= switch). The changes above can change the meaning of existing valid programs, so we're a bit more careful there.
However I believe gcc+clang both have always used the new post-DR481 behavior for _Generic (essentially, a gcc+clang bug was resolved by changing the language standard in C17, because the gcc+clang behavior makes more sense than the C11 specified behavior).