bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

yet another binutils-2.17 -Werror failure (in gas/read.c)


From: anirkko
Subject: yet another binutils-2.17 -Werror failure (in gas/read.c)
Date: Thu, 19 Apr 2007 09:55:14 +0200 (MET DST)

and again:
Using gcc-4.1.2, build of binutils-2.17 also fails in gas/read.c
due to -Werror warning:

Here, it seems to me that the code is ok. Maybe the compiler
assumes that flag_mri can change between the paired uses of stopc,
possibly because stopc is global and might be modified by another
thread between testing for setting and testing for using stopc?
(or else the compiler doesn't even care what's inside the 'if' tests...)
Is it actually possible that above situation occurs? I guess not.

Anyway, find/replace of each "char stopc;" by "char stopc = 0;"
calms down the compiler, makes the warning/build failure go away
and building continues. Should stopc be initialized by another,
more reasonable value?

Arto

-----------------------------------------------------------------------------
...
...
gcc -DHAVE_CONFIG_H -I. -I/build/binutils-2.17/gas -I. -D_GNU_SOURCE -I. 
-I/build/binutils-2.17/gas -I../bfd -I/build/binutils-2.17/gas/config 
-I/build/binutils-2.17/gas/../include -I/build/binutils-2.17/gas/.. 
-I/build/binutils-2.17/gas/../bfd -I/build/binutils-2.17/gas/../intl -I../intl 
-DLOCALEDIR="\"/usr/local/static/gcc/binutils-2.17/share/locale\""   -W -Wall 
-Wstrict-prototypes -Wmissing-prototypes -Werror -O3 -mcpu=supersparc  -c 
/build/binutils-2.17/gas/read.c
cc1: warnings being treated as errors
/build/binutils-2.17/gas/read.c: In function 's_comm_internal':
/build/binutils-2.17/gas/read.c:1426: warning: 'stopc' may be used 
uninitialized in this function
gmake[4]: *** [read.o] Error 1
gmake[4]: Leaving directory 
`/build/binutils-2.17_obj0-static_g412-b214-O3-mcpu=supersparc/gas'
gmake[3]: *** [all-recursive] Error 1
...
...




reply via email to

[Prev in Thread] Current Thread [Next in Thread]