-Werror policy

Joseph Myers joseph@codesourcery.com
Tue Nov 25 17:10:00 GMT 2014


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



More information about the Libc-alpha mailing list