gcc 4.7 build failures from -Werror

Chris Metcalf cmetcalf@ezchip.com
Wed Jan 20 17:38:00 GMT 2016


I first tried to do a build of glibc for tilepro with an old gcc 4.7.3 
compiler
that I had prebuilt and lying around.  However, this is no longer able to
build glibc; it generates maybe-uninitialized warnings in 
stdio-common/vfwscanf.c
and nis/nis_table.c.  I tried 4.8.5 and it worked fine.  I'm not sure if 
this is an
argument to upgrade to 4.8 as a minimum, or if we should spend any effort
trying to fix the issues with gcc 4.7.

In file included from vfwscanf.c:2:0:
vfscanf.c: In function ‘_IO_vfwscanf’:
vfscanf.c:1543:21: error: ‘wcdigits_extended[9]’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
vfscanf.c:1543:21: error: ‘wcdigits_extended[8]’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
vfscanf.c:1543:21: error: ‘wcdigits_extended[7]’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
vfscanf.c:1543:21: error: ‘wcdigits_extended[6]’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
vfscanf.c:1543:21: error: ‘wcdigits_extended[5]’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
vfscanf.c:1543:21: error: ‘wcdigits_extended[4]’ may be used uninitialized in this function [-Werror=maybe-uninitialized]

nis_table.c: In function ‘nis_list’:
nis_table.c:178:6: error: ‘tableptr’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
nis_table.c:214:9: note: ‘tableptr’ was declared here

-- 
Chris Metcalf, EZChip Semiconductor
http://www.ezchip.com



More information about the Libc-alpha mailing list