This is the mail archive of the gcc@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]

Re: cpp(lib) vs. pedantic warnings vs. -Werror.


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


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