-Werror now enabled by default

Richard Earnshaw rearnsha@arm.com
Thu Dec 11 14:53:00 GMT 2014


On 10/12/14 15:27, Joseph Myers wrote:
> On Wed, 10 Dec 2014, Richard Earnshaw wrote:
> 
>> On 10/12/14 01:17, Joseph Myers wrote:
>>> I've committed the patch to enable -Werror by default.  I get a clean 
>>> build and test on x86_64 with GCC 4.9, but *this is expected to break the 
>>> build for some other configurations*.  If you see build breakage from 
>>> warnings, you should submit patches to fix or disable those warnings as 
>>> appropriate (or use -Wno-error if really necessary - only for warnings not 
>>> enabled by an option that can be used in diagnostic pragmas).
>>>
>>> -Wno-error=undef is used until the build and test is clean for -Wundef on 
>>> at least one configuration.
>>>
>>
>> I'm seeing testsuite failures on AArch64:
>>
>>
>> tst-mbswcs1.c: In function ‘do_test’:
>> tst-mbswcs1.c:54:3: error: format ‘%Zd’ expects argument of type ‘signed
>> size_t’, but argument 2 has type ‘int’ [-Werror=format=]
>>    show (mbrtowc (&wc, (const char *) buf + 0, 1, &state), 1, 37);
>>    ^
> 
> Why isn't the "CFLAGS-tst-mbswcs1.c = -Wno-format" in localedata/Makefile 
> working for you?
> 

It turns out this is due to some security hardening nonsense in Ubuntu
14.04, which manages to override the user's preferences in this respect.
 I'm trying to get the Ubuntu folks to fix their compiler.

An alternative approach might be to add -Wno-error=format.  And
-Wno-error=format-extra-args when building stdio-common/tstdiomisc.c .

R.



More information about the Libc-alpha mailing list