cpp(lib) vs. pedantic warnings vs. -Werror.
Joseph S. Myers
jsm28@cam.ac.uk
Thu Jan 11 14:52:00 GMT 2001
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
More information about the Gcc
mailing list