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

Re: Disabling errors but keeping warnings


On Wed, Apr 26, 2017 at 09:57:28PM +0200, Mason wrote:
> > The manual says:
> > 
> > """
> > When an unrecognized warning option is requested (e.g.,
> > @option{-Wunknown-warning}), GCC emits a diagnostic stating
> > that the option is not recognized.  However, if the @option{-Wno-} form
> > is used, the behavior is slightly different: no diagnostic is
> > produced for @option{-Wno-unknown-warning} unless other diagnostics
> > are being produced.  This allows the use of new @option{-Wno-} options
> > with old compilers, but if something goes wrong, the compiler
> > warns that an unrecognized option is present.
> > """
> > 
> > In your example another diagnostic _is_ produced.
> 
> The documentation I was looking at was
> 
>   https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html
> 
> which AFAIU currently applies to GCC 6.
> 
> 
> Thanks for pointing out the -Wfatal-errors text.

That text isn't for any specific option.  It is a bit confusingly
placed, perhaps.

> My example was using gcc 4.8; perhaps the GCC devs have
> improved the handling of -Wno-error over several versions.

https://gcc.gnu.org/onlinedocs/gcc-4.8.5/gcc/Warning-Options.html


Segher


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