This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: egcs / g++ conflicts c++ draft standard (i think)
- To: carlo at runaway dot xs4all dot nl
- Subject: Re: egcs / g++ conflicts c++ draft standard (i think)
- From: Martin von Loewis <martin at mira dot isdn dot cs dot tu-berlin dot de>
- Date: Sat, 25 Jul 1998 22:28:24 +0200
- CC: egcs at cygnus dot com
- References: <199807251247.OAA23116@jolan.ppro>
> I think that this warning should also be given, or probably even
> be turned into an error, when compiling with -ansi :
The semantics of -ansi might be confusing, but is well-documented:
>> This turns off certain features of GNU C that are incompatible with
>> ANSI C. ... The `-ansi' option does not cause non-ANSI programs to
>> be rejected gratuitously. For that, `-pedantic' is required in
>> addition to `-ansi'.
So -ansi means that, in case of ambiguities, the ANSI C/C++ semantics
takes precedence over GNU C/C++.
If certain code cannot be mistaken for something else, GNU extensions
are still available with -ansi.
If you want all the diagnostics required for illegal input, you have
to give -pedantic:
>> Issue all the warnings demanded by strict ANSI C and ISO C++;
>> reject all programs that use forbidden extensions.
Regards,
Martin