This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: cpp(lib) vs. pedantic warnings vs. -Werror.
- To: "Chris G. Demetriou" <cgd at sibyte dot com>
- Subject: Re: cpp(lib) vs. pedantic warnings vs. -Werror.
- From: "Joseph S. Myers" <jsm28 at cam dot ac dot uk>
- Date: Thu, 11 Jan 2001 22:52:05 +0000 (GMT)
- cc: <gcc at gcc dot gnu dot org>
On 11 Jan 2001, Chris G. Demetriou wrote:
> Comparing this with the behaviour of 'gcc' (or at least, a few stop
> checks of its source 8-), it looks like GCC only calls pedwarn() in
> places guarded by a check of pedantic.
There are pedwarns not guarded by such a check. This is intentional:
mandatory pedwarns are where a construct is not permitted by ISO C, and we
agree that it is bad enough to deserve such a warning (but not an error)
by default. For example, the recently discussed case of return with a
non-void value in a function returning void. (If the returned expression
is itself of type void, that is still a constraint violation, but only
complained about if pedantic.)
--
Joseph S. Myers
jsm28@cam.ac.uk