public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c/4210: bad warning with dead code
@ 2002-11-05 7:43 bangerth
0 siblings, 0 replies; 3+ messages in thread
From: bangerth @ 2002-11-05 7:43 UTC (permalink / raw)
To: gcc-bugs, gcc-prs, gustav, mattias, nobody
Synopsis: bad warning with dead code
State-Changed-From-To: open->analyzed
State-Changed-By: bangerth
State-Changed-When: Tue Nov 5 07:43:05 2002
State-Changed-Why:
Confirmed. I may be wrong, but I believe Toon Moene has
recently filed a similar bug (recently=it's number should be
in the high 8000s) where the dead code was actually created
by a template parameter, instead of a plain constant. Whoever
looks at this one might want to look for the other report
as well.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=4210
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: c/4210: bad warning with dead code
@ 2002-11-06 14:16 Wolfgang Bangerth
0 siblings, 0 replies; 3+ messages in thread
From: Wolfgang Bangerth @ 2002-11-06 14:16 UTC (permalink / raw)
To: nobody; +Cc: gcc-prs
The following reply was made to PR c/4210; it has been noted by GNATS.
From: Wolfgang Bangerth <bangerth@ticam.utexas.edu>
To: gcc-gnats@gcc.gnu.org
Cc:
Subject: Re: c/4210: bad warning with dead code
Date: Wed, 6 Nov 2002 16:12:43 -0600 (CST)
I was wrong on the name of the originator, the range of numbers, and maybe
more of the duplicate I suspected. It had templates in it, though :-)
In any case, the duplicate was c++/8419, which I closed because it is
almost an exact duplicate.
W.
-------------------------------------------------------------------------
Wolfgang Bangerth email: bangerth@ticam.utexas.edu
www: http://www.ticam.utexas.edu/~bangerth
^ permalink raw reply [flat|nested] 3+ messages in thread
* c/4210: bad warning with dead code
@ 2001-09-03 11:36 gustav
0 siblings, 0 replies; 3+ messages in thread
From: gustav @ 2001-09-03 11:36 UTC (permalink / raw)
To: gcc-gnats; +Cc: mattias
>Number: 4210
>Category: c
>Synopsis: bad warning with dead code
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Sep 03 11:36:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator: gustav@virtutech.se
>Release: GNU C version 3.0.1 20010626 (prerelease) (i386-pc-linux-gnu)
>Organization:
>Environment:
>Description:
gcc outputs a warning about shifts >= width of type inside
dead code when that code is dead because of a const
variable. This can easily happen in autogenerated code, or
when you do operations on preprocessor defines.
>How-To-Repeat:
Compile the following with -Wall -O2:
int rol0(int a)
{
const int b = 0;
if (b) {
a = (a << b) | (a >> (8 * sizeof a - b));
}
return a;
}
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2002-11-06 22:16 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-11-05 7:43 c/4210: bad warning with dead code bangerth
-- strict thread matches above, loose matches on Subject: below --
2002-11-06 14:16 Wolfgang Bangerth
2001-09-03 11:36 gustav
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).