[Bug c/85995] GCC defines __STDC__ and __STDC_VERSION__ even when used with options that break C conformance

2018-06-01 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85995 --- Comment #5 from joseph at codesourcery dot com --- On Fri, 1 Jun 2018, vincent-gcc at vinc17 dot net wrote: > Programmers normally use conditionals on '__STDC__' to ask whether > it is safe to use certain features of ISO C, such as

[Bug c/85995] GCC defines __STDC__ and __STDC_VERSION__ even when used with options that break C conformance

2018-06-01 Thread vincent-gcc at vinc17 dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85995 --- Comment #4 from Vincent Lefèvre --- (In reply to jos...@codesourcery.com from comment #3) > See trouble.texi, "Non-bugs" / "Certain Changes We Don't Want to Make", > "Undefining @code{__STDC__} when @option{-ansi} is not used." which answer

[Bug c/85995] GCC defines __STDC__ and __STDC_VERSION__ even when used with options that break C conformance

2018-06-01 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85995 --- Comment #3 from joseph at codesourcery dot com --- See trouble.texi, "Non-bugs" / "Certain Changes We Don't Want to Make", "Undefining @code{__STDC__} when @option{-ansi} is not used." (and the description of handling of base standards in i

[Bug c/85995] GCC defines __STDC__ and __STDC_VERSION__ even when used with options that break C conformance

2018-05-30 Thread vincent-gcc at vinc17 dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85995 --- Comment #2 from Vincent Lefèvre --- I don't see the point of defining both __STDC__ and __STDC_VERSION__ if GCC cannot guarantee anything about standard conformance. With the current state, it is not possible to test these macros in order to

[Bug c/85995] GCC defines __STDC__ and __STDC_VERSION__ even when used with options that break C conformance

2018-05-30 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85995 --- Comment #1 from Richard Biener --- I guess that would break way more code than the current state (or force people to use -std=cXX over -std=gnuXX).