public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug build/9523] build error from compiler warning  for -Werror
       [not found] <20080228015801.9523.robert.bu@gmail.com>
@ 2009-01-18  1:50 ` pedro at codesourcery dot com
  2009-01-20  6:28 ` robert dot bu at gmail dot com
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 10+ messages in thread
From: pedro at codesourcery dot com @ 2009-01-18  1:50 UTC (permalink / raw)
  To: gdb-prs


------- Additional Comments From pedro at codesourcery dot com  2009-01-18 01:50 -------
I don't see this happening in current mainline.

In general, there's no need to report these build errors through the bug
tracker.  The GDB developers build gdb regularly, so these kinds of problem are
always quickly fixed.

Thanks!


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED


http://sourceware.org/bugzilla/show_bug.cgi?id=9523

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug build/9523] build error from compiler warning  for -Werror
       [not found] <20080228015801.9523.robert.bu@gmail.com>
  2009-01-18  1:50 ` [Bug build/9523] build error from compiler warning for -Werror pedro at codesourcery dot com
@ 2009-01-20  6:28 ` robert dot bu at gmail dot com
  2009-01-21 13:39 ` [Bug build/9523] build error in incall.c on gcc 3.2.3, due to compiler warning with -Werror pedro at codesourcery dot com
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 10+ messages in thread
From: robert dot bu at gmail dot com @ 2009-01-20  6:28 UTC (permalink / raw)
  To: gdb-prs


------- Additional Comments From robert dot bu at gmail dot com  2009-01-20 06:28 -------
Subject: Re:  build error from compiler warning for -Werror

Sorry for the in-convenience.

I still can re-produce the bug from CVS-20090120.

gcc -g -O2   -I. -I../../src/gdb -I../../src/gdb/config
-DLOCALEDIR="\"/home/robert_bu/local/gdb-cvs/share/locale\""
-DHAVE_CONFIG_H -I../../src/gdb/../include/opcode
-I../../src/gdb/../readline/.. -I../bfd -I../../src/gdb/../bfd
-I../../src/gdb/../include -I../libdecnumber
-I../../src/gdb/../libdecnumber  -I../../src/gdb/gnulib -Ignulib
-DMI_OUT=1 -DTUI=1  -Wall -Wdeclaration-after-statement -Wpointer-arith
-Wformat-nonliteral -Wno-unused -Wno-switch -Wno-char-subscripts -Werror
-c -o infcall.o -MT infcall.o -MMD -MP -MF .deps/infcall.Tpo
../../src/gdb/infcall.c
cc1: warnings being treated as errors
../../src/gdb/infcall.c: In function `find_function_addr':
../../src/gdb/infcall.c:212: warning: `funaddr' might be used
uninitialized in this function
make[2]: *** [infcall.o] Error 1
make[2]: Leaving directory `/home/robert_bu/src/gdb_cvs/build/gdb'
make[1]: *** [all-gdb] Error 2
make[1]: Leaving directory `/home/robert_bu/src/gdb_cvs/build'
make: *** [all] Error 2


My host is a Redhat Enterprise 3. The GCC is:
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/3.2.3/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info --enable-shared --enable-threads=posix
--disable-checking --with-system-zlib --enable-__cxa_atexit
--host=i386-redhat-linux
Thread model: posix
gcc version 3.2.3 20030502 (Red Hat Linux 3.2.3-54)

I have to initialize funaddr to NULL to compile CVS gdb.

-----Original Message-----
From: pedro at codesourcery dot com
Sent: 2009-01-18 9:50

> ------- Additional Comments From pedro at codesourcery dot com  2009-01-18 01:50 -------
> I don't see this happening in current mainline.
>
> In general, there's no need to report these build errors through the bug
> tracker.  The GDB developers build gdb regularly, so these kinds of problem are
> always quickly fixed.
>
> Thanks!
>
>


-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=9523

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug build/9523] build error in incall.c on gcc 3.2.3, due to  compiler warning  with -Werror
       [not found] <20080228015801.9523.robert.bu@gmail.com>
  2009-01-18  1:50 ` [Bug build/9523] build error from compiler warning for -Werror pedro at codesourcery dot com
  2009-01-20  6:28 ` robert dot bu at gmail dot com
@ 2009-01-21 13:39 ` pedro at codesourcery dot com
  2009-01-22  1:26 ` robert dot bu at gmail dot com
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 10+ messages in thread
From: pedro at codesourcery dot com @ 2009-01-21 13:39 UTC (permalink / raw)
  To: gdb-prs


------- Additional Comments From pedro at codesourcery dot com  2009-01-21 13:38 -------
Ok, thanks.  That's a different warning though:

old:
>../../gdb/gdb/infcall.c: In function `find_function_addr':
>../../gdb/gdb/infcall.c:197: warning: initialization makes integer from pointer 
>make[2]: *** [infcall.o] Error 1

new:
../../src/gdb/infcall.c: In function `find_function_addr':
../../src/gdb/infcall.c:212: warning: `funaddr' might be used
uninitialized in this function

I can't see any path where funaddr might be used uninitialized, though.
Maybe a gcc-3.2.3 bug?  I happen to have gcc 3.3 and 3.4 on my box, and
those also don't trigger this.

Initializing to NULL may silently hide some future bugs, where that
warning would be useful.  Oh, well, we should handle this somehow.


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |
            Summary|build error from compiler   |build error in incall.c on
                   |warning  for -Werror        |gcc 3.2.3, due to  compiler
                   |                            |warning  with -Werror


http://sourceware.org/bugzilla/show_bug.cgi?id=9523

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug build/9523] build error in incall.c on gcc 3.2.3, due to  compiler warning  with -Werror
       [not found] <20080228015801.9523.robert.bu@gmail.com>
                   ` (2 preceding siblings ...)
  2009-01-21 13:39 ` [Bug build/9523] build error in incall.c on gcc 3.2.3, due to compiler warning with -Werror pedro at codesourcery dot com
@ 2009-01-22  1:26 ` robert dot bu at gmail dot com
  2009-04-02 15:59 ` tromey at redhat dot com
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 10+ messages in thread
From: robert dot bu at gmail dot com @ 2009-01-22  1:26 UTC (permalink / raw)
  To: gdb-prs


------- Additional Comments From robert dot bu at gmail dot com  2009-01-22 01:26 -------
Subject: Re:  build error in incall.c on gcc 3.2.3, due to 
	compiler warning with -Werror

Yes. It can be a gcc-3.2.3 -O2 bug. Without -O2, it compiles without any
problem. I tried gcc-3.3.6 here, and didn't encounter the problem.

Thank you for your kind patience.

-----Original Message-----
From: pedro at codesourcery dot com
Sent: 2009-01-21 21:39

> ------- Additional Comments From pedro at codesourcery dot com  2009-01-21 13:38 -------
> Ok, thanks.  That's a different warning though:
>
> old:
>> ../../gdb/gdb/infcall.c: In function `find_function_addr':
>> ../../gdb/gdb/infcall.c:197: warning: initialization makes integer from pointer
>> make[2]: *** [infcall.o] Error 1
>
> new:
> ./../src/gdb/infcall.c: In function `find_function_addr':
> ./../src/gdb/infcall.c:212: warning: `funaddr' might be used
> uninitialized in this function
>
> I can't see any path where funaddr might be used uninitialized, though.
> Maybe a gcc-3.2.3 bug?  I happen to have gcc 3.3 and 3.4 on my box, and
> those also don't trigger this.
>
> Initializing to NULL may silently hide some future bugs, where that
> warning would be useful.  Oh, well, we should handle this somehow.
>
>


-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=9523

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug build/9523] build error in incall.c on gcc 3.2.3, due to  compiler warning  with -Werror
       [not found] <20080228015801.9523.robert.bu@gmail.com>
                   ` (3 preceding siblings ...)
  2009-01-22  1:26 ` robert dot bu at gmail dot com
@ 2009-04-02 15:59 ` tromey at redhat dot com
  2009-04-02 16:01 ` tromey at redhat dot com
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 10+ messages in thread
From: tromey at redhat dot com @ 2009-04-02 15:59 UTC (permalink / raw)
  To: gdb-prs


------- Additional Comments From tromey at redhat dot com  2009-04-02 15:59 -------
*** Bug 10024 has been marked as a duplicate of this bug. ***

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |Steffen dot DETTMER at
                   |                            |ingenico dot com


http://sourceware.org/bugzilla/show_bug.cgi?id=9523

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug build/9523] build error in incall.c on gcc 3.2.3, due to  compiler warning  with -Werror
       [not found] <20080228015801.9523.robert.bu@gmail.com>
                   ` (4 preceding siblings ...)
  2009-04-02 15:59 ` tromey at redhat dot com
@ 2009-04-02 16:01 ` tromey at redhat dot com
  2009-04-02 17:06 ` bauermann at sourceware dot org
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 10+ messages in thread
From: tromey at redhat dot com @ 2009-04-02 16:01 UTC (permalink / raw)
  To: gdb-prs


------- Additional Comments From tromey at redhat dot com  2009-04-02 16:01 -------
One idea would be to disable the warnings for older versions of GCC.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |tromey at redhat dot com


http://sourceware.org/bugzilla/show_bug.cgi?id=9523

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug build/9523] build error in incall.c on gcc 3.2.3, due to  compiler warning  with -Werror
       [not found] <20080228015801.9523.robert.bu@gmail.com>
                   ` (5 preceding siblings ...)
  2009-04-02 16:01 ` tromey at redhat dot com
@ 2009-04-02 17:06 ` bauermann at sourceware dot org
  2009-04-02 17:10 ` bauermann at sourceware dot org
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 10+ messages in thread
From: bauermann at sourceware dot org @ 2009-04-02 17:06 UTC (permalink / raw)
  To: gdb-prs


------- Additional Comments From bauermann at sourceware dot org  2009-04-02 17:06 -------
Actually, GDB releases used to ship with --disable-werror by default, which I
think is a good idea. GDB 6.8 uses -Werror by default, but I think that was an
oversight.

For snapshots of CVS HEAD, one should configure with --disable-werror if
problems like this are encountered. Perhaps we should document this more
prominently?

-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=9523

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug build/9523] build error in incall.c on gcc 3.2.3, due to  compiler warning  with -Werror
       [not found] <20080228015801.9523.robert.bu@gmail.com>
                   ` (6 preceding siblings ...)
  2009-04-02 17:06 ` bauermann at sourceware dot org
@ 2009-04-02 17:10 ` bauermann at sourceware dot org
  2009-04-03 15:37 ` [Bug build/9523] build error in infcall.c " tromey at redhat dot com
  2010-06-23 17:18 ` steffen dot dettmer at gmail dot com
  9 siblings, 0 replies; 10+ messages in thread
From: bauermann at sourceware dot org @ 2009-04-02 17:10 UTC (permalink / raw)
  To: gdb-prs


------- Additional Comments From bauermann at sourceware dot org  2009-04-02 17:10 -------
By the way, I'm not opposed to creating a list of known-bad GCC versions and
selectively disable -Werror for them in CVS HEAD...

-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=9523

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug build/9523] build error in infcall.c on gcc 3.2.3, due to  compiler warning  with -Werror
       [not found] <20080228015801.9523.robert.bu@gmail.com>
                   ` (7 preceding siblings ...)
  2009-04-02 17:10 ` bauermann at sourceware dot org
@ 2009-04-03 15:37 ` tromey at redhat dot com
  2010-06-23 17:18 ` steffen dot dettmer at gmail dot com
  9 siblings, 0 replies; 10+ messages in thread
From: tromey at redhat dot com @ 2009-04-03 15:37 UTC (permalink / raw)
  To: gdb-prs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|build error in incall.c on  |build error in infcall.c on
                   |gcc 3.2.3, due to  compiler |gcc 3.2.3, due to  compiler
                   |warning  with -Werror       |warning  with -Werror


http://sourceware.org/bugzilla/show_bug.cgi?id=9523

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug build/9523] build error in infcall.c on gcc 3.2.3, due to  compiler warning  with -Werror
       [not found] <20080228015801.9523.robert.bu@gmail.com>
                   ` (8 preceding siblings ...)
  2009-04-03 15:37 ` [Bug build/9523] build error in infcall.c " tromey at redhat dot com
@ 2010-06-23 17:18 ` steffen dot dettmer at gmail dot com
  9 siblings, 0 replies; 10+ messages in thread
From: steffen dot dettmer at gmail dot com @ 2010-06-23 17:18 UTC (permalink / raw)
  To: gdb-prs


------- Additional Comments From steffen dot dettmer at gmail dot com  2010-06-23 17:18 -------
> Actually, GDB releases used to ship with --disable-werror by default, which I
> think is a good idea. GDB 6.8 uses -Werror by default, but I think that was an
> oversight.

Same for GDB 7.1, it uses -Werror by default:

$ ../configure --target=arm-elf

$ make
 
make[4]: Entering directory `/usr/local/build/gdb-7.1/build/bfd'
/bin/sh ./libtool --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I../../bfd
-I. -I../../bfd -I../../bfd/../include   -DBINDIR='"/usr/local/bin"'  -W -Wall
-Wstrict-prototypes -Wmissing-prototypes -Wshadow -Werror -g -O2 -MT
elf32-arm.lo -MD -MP -MF .deps/elf32-arm.Tpo -c -o elf32-arm.lo
../../bfd/elf32-arm.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../../bfd -I. -I../../bfd
-I../../bfd/../include -DBINDIR=\"/usr/local/bin\" -W -Wall -Wstrict-prototypes
-Wmissing-prototypes -Wshadow -Werror -g -O2 -MT elf32-arm.lo -MD -MP -MF
.deps/elf32-arm.Tpo -c ../../bfd/elf32-arm.c -o elf32-arm.o
cc1: warnings being treated as errors
../../bfd/elf32-arm.c: In function `cortex_a8_erratum_scan':
../../bfd/elf32-arm.c:4043: warning: `offset' might be used uninitialized in
this function
make[4]: *** [elf32-arm.lo] Error 1
make[4]: Leaving directory `/usr/local/build/gdb-7.1/build/bfd'

$ gcc --version
gcc (GCC) 3.2

(yes I know it is old)


-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=9523

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2010-06-23 17:18 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20080228015801.9523.robert.bu@gmail.com>
2009-01-18  1:50 ` [Bug build/9523] build error from compiler warning for -Werror pedro at codesourcery dot com
2009-01-20  6:28 ` robert dot bu at gmail dot com
2009-01-21 13:39 ` [Bug build/9523] build error in incall.c on gcc 3.2.3, due to compiler warning with -Werror pedro at codesourcery dot com
2009-01-22  1:26 ` robert dot bu at gmail dot com
2009-04-02 15:59 ` tromey at redhat dot com
2009-04-02 16:01 ` tromey at redhat dot com
2009-04-02 17:06 ` bauermann at sourceware dot org
2009-04-02 17:10 ` bauermann at sourceware dot org
2009-04-03 15:37 ` [Bug build/9523] build error in infcall.c " tromey at redhat dot com
2010-06-23 17:18 ` steffen dot dettmer at gmail dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).