public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c/3074: Statement with no effect not flagged with -Wall
@ 2003-05-08 8:46 Dara Hazeghi
0 siblings, 0 replies; 2+ messages in thread
From: Dara Hazeghi @ 2003-05-08 8:46 UTC (permalink / raw)
To: nobody; +Cc: gcc-prs
The following reply was made to PR c/3074; it has been noted by GNATS.
From: Dara Hazeghi <dhazeghi@yahoo.com>
To: gcc-gnats@gcc.gnu.org
Cc:
Subject: Re: c/3074: Statement with no effect not flagged with -Wall
Date: Thu, 8 May 2003 01:39:44 -0700
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-
trail&database=gcc&pr=3074
Confirmed with mainline 20030507
Dara
^ permalink raw reply [flat|nested] 2+ messages in thread
* c/3074: Statement with no effect not flagged with -Wall
@ 2001-06-07 7:56 fritz
0 siblings, 0 replies; 2+ messages in thread
From: fritz @ 2001-06-07 7:56 UTC (permalink / raw)
To: gcc-gnats
>Number: 3074
>Category: c
>Synopsis: Statement with no effect not flagged with -Wall
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: unassigned
>State: open
>Class: accepts-illegal
>Submitter-Id: net
>Arrival-Date: Thu Jun 07 07:56:01 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator: Fritz Boehm
>Release: gcc version 2.96 20000731 (Red Hat Linux 7.1 2.96-81)
>Organization:
>Environment:
Red Hat Linux 7.1
>Description:
This bug has to do with some statements with no effect going undetected
by gcc. The line on line 4 of bug.c should (I believe) be flagged as
a statement with no effect when run with -Wall. I munged the statement
in two different ways (lines 5 and 6) which are correctly reported as
statements with no effect.
I have access to two linux boxes with different revisions of g++. Both
yield the same results:
<fritz @ schrems.eng.evsx.com> 1491% gcc -v
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/egcs-2.91.66/specs
gcc version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)
<fritz @ schrems.eng.evsx.com> 1492% gcc -c bug.c -Wall
bug.c: In function `main':
bug.c:5: warning: statement with no effect
bug.c:6: warning: statement with no effect
<fritz @ lott.eng.evsx.com> 10% gcc -v
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.96/specs
gcc version 2.96 20000731 (Red Hat Linux 7.1 2.96-81)
<fritz @ lott.eng.evsx.com> 11% gcc -c -Wall bug.c
bug.c: In function `main':
bug.c:5: warning: statement with no effect
bug.c:6: warning: statement with no effect
Another aspect that you might find interesting - there is assembly
code generated for the apparently dead code at line 4. I'm not an
x86 assembly wizard so I can't tell you what the code does, but there
is extra code generated.
I hope this helps. Feel free to email me with any questions. This is
the first bug I've submitted for GNU tools (which I make use of extensively)
so I hope I'm providing good feedback.
>How-To-Repeat:
gcc -c -Wall bug.c
>Fix:
Don't enter statements that have no effect :-D
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/x-tar; name="bug.tar.gz"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="bug.tar.gz"
H4sIALaNHzsAA+3UyWrDMBQFUG2tr7ikm7jQ5CnysDCh36KE1GhRFVSbQod/r5yEFkKHtGAXyj0b
yfAeErKuNn272KpxiRGpKlGSlLbaj2LsYUxWtVFSW6mL2ha2HOrTTEFG3tdef9+5CKib6LvHL+p2
oZ1iO1PzocOt82Ge6yc9fLhGZyUuMXdYr2FyPB+nq7zBu+US4Q4PLgYfWlxh07fXp40fdqbGY5fO
vlnjpFxncdf1MUAa/aL/+uD+ifTfFn7kNQ75Lz7PfyFv+S/FMP8TuoDBbLgE25n+7VuAs4KPs/IO
xpyIiIiIiIiIiIiIiIiIiIjoR14BuO1YcQAoAAA=
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-05-08 8:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-05-08 8:46 c/3074: Statement with no effect not flagged with -Wall Dara Hazeghi
-- strict thread matches above, loose matches on Subject: below --
2001-06-07 7:56 fritz
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).