This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85995

--- Comment #4 from Vincent Lefèvre <vincent-gcc at vinc17 dot net> ---
(In reply to joseph@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 answers my request.

     Programmers normally use conditionals on '__STDC__' to ask whether
     it is safe to use certain features of ISO C, such as function
     prototypes or ISO token concatenation.

Precisely this is what I wish to do, with 2 versions of a macro: one that
assumes C conformance (requiring -fexcess-precision=standard with GCC, in
particular), and another one that doesn't but may be slower.

     Since plain 'gcc' supports all the features of ISO C, the correct
     answer to these questions is "yes".

This sentence is wrong by default, as it would imply
-fexcess-precision=standard!

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]