This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB 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: [RFC] Stabs parsing regression from GDB 6.6 to GDB 6.6.90


Pedro,

you patch to main leads to a warning when compiling stabsread.o
because sign_bit might be used uninitialized.
  Even though this is a false alarm,
as sign_bit is set if two_complement_representation is,
and used later only if two_complement_representation is set;
we need to correct this, as it leads to a compilation failure if
-Werror is used.

gcc -c -g -O2    -I. -I../../src/gdb -I../../src/gdb/config
-DLOCALEDIR="\"/usr/
local/share/locale\"" -DHAVE_CONFIG_H -I../../src/gdb/../include/opcode
-I../../
src/gdb/../readline/.. -I../bfd -I../../src/gdb/../bfd
-I../../src/gdb/../includ
e   -DMI_OUT=1 -DTUI=1  -Wall -Wdeclaration-after-statement -Wpointer-arith
-Wfo
rmat-nonliteral -Wno-unused -Wno-switch -Wno-char-subscripts -Werror
version.c
gcc -c -g -O2    -I. -I../../src/gdb -I../../src/gdb/config
-DLOCALEDIR="\"/usr/
local/share/locale\"" -DHAVE_CONFIG_H -I../../src/gdb/../include/opcode
-I../../
src/gdb/../readline/.. -I../bfd -I../../src/gdb/../bfd
-I../../src/gdb/../includ
e   -DMI_OUT=1 -DTUI=1  -Wall -Wdeclaration-after-statement -Wpointer-arith
-Wfo
rmat-nonliteral -Wno-unused -Wno-switch -Wno-char-subscripts -Werror
../../src/g
db/stabsread.c
../../src/gdb/stabsread.c: In function `read_huge_number':
../../src/gdb/stabsread.c:3736: warning: 'sign_bit' might be used
uninitialized
in this function
make[1]: *** [stabsread.o] Error 1
make[1]: Leaving directory `/usr/local/src/cvs/build/gdb'
make: *** [all-gdb] Error 2

Declaring it with initial value = 0
is enough to fix the compilation failure.

Pierre



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