public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/11370] New: -Wunreachable-code gives false complaints
@ 2003-06-29 10:57 debian-gcc at lists dot debian dot org
2003-06-29 13:39 ` [Bug c/11370] [3.3/3.4 Regression] " pinskia at physics dot uc dot edu
` (8 more replies)
0 siblings, 9 replies; 10+ messages in thread
From: debian-gcc at lists dot debian dot org @ 2003-06-29 10:57 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11370
Summary: -Wunreachable-code gives false complaints
Product: gcc
Version: 3.3
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: debian-gcc at lists dot debian dot org
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i386-linux
GCC host triplet: i386-linux
GCC target triplet: i386-linux
[forwarded from http://bugs.debian.org/196600]
rechecked with HEAD.
Gcc complains that a declaration "will never be executed" for a
code path that executes, as shown below.
If I:
. remove the exit line
. change "int ix;" to "int ix = 0;"
or
. move the declaration to line 2 or after line 3
the complaint go away.
$ cat -n test.c
#include <stdio.h>
int main(int argc, char *argv[]) { /* line 3 */
if (argc != 1) exit(1);
{
int ix; /* line 7 */
ix = printf("hello\n");
printf("%d\n", ix);
}
return 0;
}
$ gcc-3.3 -Wunreachable-code test.c; ./a.out
test.c: In function `main':
test.c:7: warning: will never be executed
hello
6
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c/11370] [3.3/3.4 Regression] -Wunreachable-code gives false complaints
2003-06-29 10:57 [Bug c/11370] New: -Wunreachable-code gives false complaints debian-gcc at lists dot debian dot org
@ 2003-06-29 13:39 ` pinskia at physics dot uc dot edu
2003-07-05 16:55 ` roger at eyesopen dot com
` (7 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: pinskia at physics dot uc dot edu @ 2003-06-29 13:39 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11370
pinskia at physics dot uc dot edu changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Keywords| |diagnostic
Last reconfirmed|0000-00-00 00:00:00 |2003-06-29 13:39:29
date| |
Summary|-Wunreachable-code gives |[3.3/3.4 Regression] -
|false complaints |Wunreachable-code gives
| |false complaints
Target Milestone|3.4 |3.3.1
------- Additional Comments From pinskia at physics dot uc dot edu 2003-06-29 13:39 -------
I can confirm this bug on the mainline (20030629) and in 3.3.1 (20030616). I also
happens in 3.2.2 and 3.2.3 but does not in 3.0.4 (2.95.3 does not have the option), so this
is a regression.
Note this only happens with -march=i386 (with -march=i686 the warning does not
happen).
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c/11370] [3.3/3.4 Regression] -Wunreachable-code gives false complaints
2003-06-29 10:57 [Bug c/11370] New: -Wunreachable-code gives false complaints debian-gcc at lists dot debian dot org
2003-06-29 13:39 ` [Bug c/11370] [3.3/3.4 Regression] " pinskia at physics dot uc dot edu
@ 2003-07-05 16:55 ` roger at eyesopen dot com
2003-07-06 14:32 ` pinskia at physics dot uc dot edu
` (6 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: roger at eyesopen dot com @ 2003-07-05 16:55 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11370
roger at eyesopen dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |roger at eyesopen dot com
|dot org |
Status|NEW |ASSIGNED
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c/11370] [3.3/3.4 Regression] -Wunreachable-code gives false complaints
2003-06-29 10:57 [Bug c/11370] New: -Wunreachable-code gives false complaints debian-gcc at lists dot debian dot org
2003-06-29 13:39 ` [Bug c/11370] [3.3/3.4 Regression] " pinskia at physics dot uc dot edu
2003-07-05 16:55 ` roger at eyesopen dot com
@ 2003-07-06 14:32 ` pinskia at physics dot uc dot edu
2003-07-09 1:17 ` cvs-commit at gcc dot gnu dot org
` (5 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: pinskia at physics dot uc dot edu @ 2003-07-06 14:32 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11370
------- Additional Comments From pinskia at physics dot uc dot edu 2003-07-06 14:32 -------
*** Bug 11445 has been marked as a duplicate of this bug. ***
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c/11370] [3.3/3.4 Regression] -Wunreachable-code gives false complaints
2003-06-29 10:57 [Bug c/11370] New: -Wunreachable-code gives false complaints debian-gcc at lists dot debian dot org
` (2 preceding siblings ...)
2003-07-06 14:32 ` pinskia at physics dot uc dot edu
@ 2003-07-09 1:17 ` cvs-commit at gcc dot gnu dot org
2003-07-10 20:58 ` steven at gcc dot gnu dot org
` (4 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2003-07-09 1:17 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11370
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2003-07-09 01:17 -------
Subject: Bug 11370
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: sayle@gcc.gnu.org 2003-07-09 01:17:28
Modified files:
gcc : ChangeLog calls.c
gcc/testsuite : ChangeLog
Added files:
gcc/testsuite/gcc.dg: Wunreachable-6.c Wunreachable-7.c
Log message:
PR c/11370
* calls.c (emit_call_1): Don't bother popping the arguments off of
the stack after a noreturn function call; The adjustment is dead.
(expand_call): Likewise.
* gcc.dg/Wunreachable-6.c: New testcase.
* gcc.dg/Wunreachable-7.c: New testcase.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.412&r2=2.413
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/calls.c.diff?cvsroot=gcc&r1=1.284&r2=1.285
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.2852&r2=1.2853
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/Wunreachable-6.c.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/Wunreachable-7.c.diff?cvsroot=gcc&r1=NONE&r2=1.1
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c/11370] [3.3/3.4 Regression] -Wunreachable-code gives false complaints
2003-06-29 10:57 [Bug c/11370] New: -Wunreachable-code gives false complaints debian-gcc at lists dot debian dot org
` (3 preceding siblings ...)
2003-07-09 1:17 ` cvs-commit at gcc dot gnu dot org
@ 2003-07-10 20:58 ` steven at gcc dot gnu dot org
2003-07-11 14:59 ` [Bug c/11370] [3.3 " pinskia at physics dot uc dot edu
` (3 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: steven at gcc dot gnu dot org @ 2003-07-10 20:58 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11370
steven at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |sayle at gcc dot gnu dot org
------- Additional Comments From steven at gcc dot gnu dot org 2003-07-10 20:58 -------
Roger, does this bug still need fixing somewhere or should it be closed?
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c/11370] [3.3 Regression] -Wunreachable-code gives false complaints
2003-06-29 10:57 [Bug c/11370] New: -Wunreachable-code gives false complaints debian-gcc at lists dot debian dot org
` (4 preceding siblings ...)
2003-07-10 20:58 ` steven at gcc dot gnu dot org
@ 2003-07-11 14:59 ` pinskia at physics dot uc dot edu
2003-07-11 22:50 ` mmitchel at gcc dot gnu dot org
` (2 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: pinskia at physics dot uc dot edu @ 2003-07-11 14:59 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11370
pinskia at physics dot uc dot edu changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|[3.3/3.4 Regression] - |[3.3 Regression] -
|Wunreachable-code gives |Wunreachable-code gives
|false complaints |false complaints
------- Additional Comments From pinskia at physics dot uc dot edu 2003-07-11 14:59 -------
This is a 3.3 regression only now. It has been fixed on the mainline.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c/11370] [3.3 Regression] -Wunreachable-code gives false complaints
2003-06-29 10:57 [Bug c/11370] New: -Wunreachable-code gives false complaints debian-gcc at lists dot debian dot org
` (5 preceding siblings ...)
2003-07-11 14:59 ` [Bug c/11370] [3.3 " pinskia at physics dot uc dot edu
@ 2003-07-11 22:50 ` mmitchel at gcc dot gnu dot org
2003-08-09 3:50 ` [Bug other/11370] " cvs-commit at gcc dot gnu dot org
2003-08-09 3:57 ` pinskia at gcc dot gnu dot org
8 siblings, 0 replies; 10+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2003-07-11 22:50 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11370
mmitchel at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|3.3.1 |3.3.2
------- Additional Comments From mmitchel at gcc dot gnu dot org 2003-07-11 22:50 -------
Postponed until GCC 3.3.2.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug other/11370] [3.3 Regression] -Wunreachable-code gives false complaints
2003-06-29 10:57 [Bug c/11370] New: -Wunreachable-code gives false complaints debian-gcc at lists dot debian dot org
` (6 preceding siblings ...)
2003-07-11 22:50 ` mmitchel at gcc dot gnu dot org
@ 2003-08-09 3:50 ` cvs-commit at gcc dot gnu dot org
2003-08-09 3:57 ` pinskia at gcc dot gnu dot org
8 siblings, 0 replies; 10+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2003-08-09 3:50 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11370
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2003-08-09 03:50 -------
Subject: Bug 11370
CVSROOT: /cvs/gcc
Module name: gcc
Branch: gcc-3_3-branch
Changes by: sayle@gcc.gnu.org 2003-08-09 03:50:05
Modified files:
gcc : ChangeLog calls.c
gcc/testsuite : ChangeLog
Added files:
gcc/testsuite/gcc.dg: Wunreachable-6.c Wunreachable-7.c
Log message:
PR c/11370
* calls.c (emit_call_1): Don't bother popping the arguments off of
the stack after a noreturn function call; The adjustment is dead.
(expand_call): Likewise.
* gcc.dg/Wunreachable-6.c: New testcase.
* gcc.dg/Wunreachable-7.c: New testcase.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.16114.2.699&r2=1.16114.2.700
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/calls.c.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.244.2.9&r2=1.244.2.10
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.2261.2.249&r2=1.2261.2.250
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/Wunreachable-6.c.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=NONE&r2=1.1.10.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/Wunreachable-7.c.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=NONE&r2=1.1.10.1
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug other/11370] [3.3 Regression] -Wunreachable-code gives false complaints
2003-06-29 10:57 [Bug c/11370] New: -Wunreachable-code gives false complaints debian-gcc at lists dot debian dot org
` (7 preceding siblings ...)
2003-08-09 3:50 ` [Bug other/11370] " cvs-commit at gcc dot gnu dot org
@ 2003-08-09 3:57 ` pinskia at gcc dot gnu dot org
8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-08-09 3:57 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11370
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
------- Additional Comments From pinskia at gcc dot gnu dot org 2003-08-09 03:57 -------
Fixed for 3.3.2.
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2003-08-09 3:57 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-06-29 10:57 [Bug c/11370] New: -Wunreachable-code gives false complaints debian-gcc at lists dot debian dot org
2003-06-29 13:39 ` [Bug c/11370] [3.3/3.4 Regression] " pinskia at physics dot uc dot edu
2003-07-05 16:55 ` roger at eyesopen dot com
2003-07-06 14:32 ` pinskia at physics dot uc dot edu
2003-07-09 1:17 ` cvs-commit at gcc dot gnu dot org
2003-07-10 20:58 ` steven at gcc dot gnu dot org
2003-07-11 14:59 ` [Bug c/11370] [3.3 " pinskia at physics dot uc dot edu
2003-07-11 22:50 ` mmitchel at gcc dot gnu dot org
2003-08-09 3:50 ` [Bug other/11370] " cvs-commit at gcc dot gnu dot org
2003-08-09 3:57 ` pinskia at gcc dot gnu dot org
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).