This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug build/10024] New: /gdb/infcall.c:197: warning: `funaddr' might be used uninitialized (gcc 3.2 compiler warning + -Werror)
- From: "Steffen dot DETTMER at ingenico dot com" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: 2 Apr 2009 12:35:57 -0000
- Subject: [Bug build/10024] New: /gdb/infcall.c:197: warning: `funaddr' might be used uninitialized (gcc 3.2 compiler warning + -Werror)
- Reply-to: sourceware-bugzilla at sourceware dot org
older gcc (3.2) gives (false?) warning, because -Werror is set,
gdb cannot be build.
../configure --target=arm-elf --disable-expat --with-expat=no
gcc -c -g -O2 -I. -I../../gdb -I../../gdb/config
-DLOCALEDIR="\"/usr/local/share/locale\"" -DHAVE_CONFIG_H
-I../../gdb/../include/opcode -I../../gdb/../readline/.. -I../bfd
-I../../gdb/../bfd -I../../gdb/../include -I../libdecnumber
-I../../gdb/../libdecnumber -DMI_OUT=1 -DTUI=1 -Wall
-Wpointer-arith -Wformat-nonliteral -Wno-unused -Wno-switch
-Wno-char-subscripts -Werror ../../gdb/infcall.c
cc1: warnings being treated as errors
../../gdb/infcall.c: In function `find_function_addr':
../../gdb/infcall.c:197: warning: `funaddr' might be used
uninitialized in this function
make[2]: *** [infcall.o] Error 1
make[2]: Leaving directory `/usr/local/build/gdb-6.8/build/gdb'
make[1]: *** [all-gdb] Error 2
make[1]: Leaving directory `/usr/local/build/gdb-6.8/build'
make: *** [all] Error 2
steffen@desupr-dev:/local/tmp/steffen_exp/teliport_exp.all/pmng # gcc --version
gcc (GCC) 3.2
Copyright (C) 2002 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
CORE_ADDR
find_function_addr (struct value *function, struct type **retval_type)
{
struct type *ftype = check_typedef (value_type (function));
enum type_code code = TYPE_CODE (ftype);
struct type *value_type;
CORE_ADDR funaddr = 0; /* just init to zero to avoid a (false?) warning */
...
}
--
Summary: /gdb/infcall.c:197: warning: `funaddr' might be used
uninitialized (gcc 3.2 compiler warning + -Werror)
Product: gdb
Version: 6.8
Status: UNCONFIRMED
Severity: minor
Priority: P2
Component: build
AssignedTo: unassigned at sourceware dot org
ReportedBy: Steffen dot DETTMER at ingenico dot com
CC: gdb-prs at sourceware dot org
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: arm-elf
http://sourceware.org/bugzilla/show_bug.cgi?id=10024
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.