This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: -Werror policy
- From: Paul Eggert <eggert at cs dot ucla dot edu>
- To: Florian Weimer <fweimer at redhat dot com>, Joseph Myers <joseph at codesourcery dot com>, libc-alpha at sourceware dot org
- Date: Fri, 14 Nov 2014 11:15:48 -0800
- Subject: Re: -Werror policy
- Authentication-results: sourceware.org; auth=none
- References: <alpine dot DEB dot 2 dot 10 dot 1411132331520 dot 5050 at digraph dot polyomino dot org dot uk> <54664981 dot 1070002 at redhat dot com>
On 11/14/2014 10:27 AM, Florian Weimer wrote:
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.
This has also been my experience with Gnulib and with Emacs. For
identical code -Werror causes failures on some platforms and not on
others, the failures can depend on which GCC flags are being used, and
it's not uncommon for failures to be false alarms (e.g., GCC warns that
it's making an allowed optimization, and are you sure you want that?
well yes, you do).
Gnulib uses macros that expand to pragmas to work around some of these
problems. For example, Gnulib's _GL_INLINE_HEADER_BEGIN and
_GL_INLINE_HEADER_END macros deal with GCC's unwanted warnings about
extern inline functions. I just now checked and one of those GCC bugs
is still present, so I filed another GCC bug report about this
<https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63877>.