-Werror policy

Florian Weimer fweimer@redhat.com
Fri Nov 14 18:27:00 GMT 2014


On 11/14/2014 12:43 AM, Joseph Myers wrote:
> * If a particular warning seems hard to fix (including hard-to-fix false
> positives), use
>
> #pragma GCC diagnostic push
> #pragma GCC diagnostic ignored "-Wfoo"
>
> #pragma GCC diagnostic pop
>
> around the code generating the warning, with a comment stating the warning
> and a GCC version / architecture for which it was observed.  (In files
> shared with gnulib, these pragma calls would need to be conditional.)

It's certainly better to use the pragmas then to massage the code until 
the warning goes away, but I'm a bit hesitant to clutter the source code 
with hat are essentially workarounds for compiler bugs.

There's also the issue of warnings issued from fold and the optimizers, 
which are rather architecture-specific.  This means that port 
maintainers will face some -Werror fallout.

-- 
Florian Weimer / Red Hat Product Security



More information about the Libc-alpha mailing list