This is the mail archive of the
mailing list for the glibc project.
Re: -Werror policy
- From: Joseph Myers <joseph at codesourcery dot com>
- To: Roland McGrath <roland at hack dot frob dot com>
- Cc: <libc-alpha at sourceware dot org>
- Date: Tue, 25 Nov 2014 17:10:33 +0000
- 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> <20141114001831 dot 8C7CF2C3B16 at topped-with-meat dot com>
On Thu, 13 Nov 2014, Roland McGrath wrote:
> We should never use per-file -Wno-* options in makefiles. If there is a
> file-wide issue, we can just put:
> #pragma GCC diagnostic ignored "-Wfoo"
> near the top of the file (but usually after all its #include lines so it
> does not affect code from headers). In the same vein, but separate from
For the warnings from fortification tests such as:
../wcsmbs/bits/wchar2.h:200:2: warning: call to '__wcsncpy_chk_warn' declared with attribute warning: wcsncpy called with length bigger than size of destination buffer
(which actually make up a large proportion of the warnings from the
testsuite, though only coming from a handful of tests), I think we need to
use -Wno-error in the makefiles, as there is no -W option to control these
warnings and the pragmas can only stop warnings being errors when there is
such an option controlling the particular warning.
Joseph S. Myers