-Werror policy
Paul Eggert
eggert@cs.ucla.edu
Fri Nov 14 19:15:00 GMT 2014
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>.
More information about the Libc-alpha
mailing list