This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc 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: -Werror policy


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
joseph@codesourcery.com


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