public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/23228] New: Silly "unused variable" warning after redeclaration of a local variable
@ 2005-08-04 11:16 steven at gcc dot gnu dot org
2005-08-04 12:20 ` [Bug c/23228] " gdr at integrable-solutions dot net
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: steven at gcc dot gnu dot org @ 2005-08-04 11:16 UTC (permalink / raw)
To: gcc-bugs
Maybe there are similar issues elsewhere, but this one happened
to bother me... This warning is also issed by GCC 3.3, so I guess
it is not a regression. But it's a silly warning after errors.
=================== t.c ===================
int bar (void);
int foo (void)
{
int i;
int i;
i = bar ();
return 2*i;
}
===========================================
$ gcc -Wall -Wextra -O2 t.c
t.c: In function 'foo':
t.c:5: error: redeclaration of 'i' with no linkage
t.c:4: error: previous declaration of 'i' was here
t.c:4: warning: unused variable 'i'
$
--
Summary: Silly "unused variable" warning after redeclaration of a
local variable
Product: gcc
Version: 4.1.0
Status: UNCONFIRMED
Keywords: diagnostic
Severity: normal
Priority: P2
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: steven at gcc dot gnu dot org
CC: gcc-bugs at gcc dot gnu dot org,jsm28 at gcc dot gnu dot
org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23228
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c/23228] Silly "unused variable" warning after redeclaration of a local variable
2005-08-04 11:16 [Bug c/23228] New: Silly "unused variable" warning after redeclaration of a local variable steven at gcc dot gnu dot org
@ 2005-08-04 12:20 ` gdr at integrable-solutions dot net
2005-08-04 13:04 ` [Bug c/23228] [3.4/4.0/4.1 Regression] " pinskia at gcc dot gnu dot org
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: gdr at integrable-solutions dot net @ 2005-08-04 12:20 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From gdr at integrable-solutions dot net 2005-08-04 12:20 -------
Subject: Re: New: Silly "unused variable" warning after redeclaration of a local variable
"steven at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> writes:
| Maybe there are similar issues elsewhere, but this one happened
| to bother me... This warning is also issed by GCC 3.3, so I guess
| it is not a regression. But it's a silly warning after errors.
Agreed.
-- Gaby
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23228
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c/23228] [3.4/4.0/4.1 Regression] Silly "unused variable" warning after redeclaration of a local variable
2005-08-04 11:16 [Bug c/23228] New: Silly "unused variable" warning after redeclaration of a local variable steven at gcc dot gnu dot org
2005-08-04 12:20 ` [Bug c/23228] " gdr at integrable-solutions dot net
@ 2005-08-04 13:04 ` pinskia at gcc dot gnu dot org
2005-08-08 18:19 ` pinskia at gcc dot gnu dot org
2005-09-27 16:17 ` mmitchel at gcc dot gnu dot org
3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-08-04 13:04 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-08-04 13:04 -------
Confirmed, a regression from 3.0.4 and 2.95.3.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Known to fail| |3.3 3.2.3 3.4.0 4.0.0 4.1.0
Known to work| |3.0.4 2.95.3
Last reconfirmed|0000-00-00 00:00:00 |2005-08-04 13:04:17
date| |
Summary|Silly "unused variable" |[3.4/4.0/4.1 Regression]
|warning after redeclaration |Silly "unused variable"
|of a local variable |warning after redeclaration
| |of a local variable
Target Milestone|--- |4.0.2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23228
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c/23228] [3.4/4.0/4.1 Regression] Silly "unused variable" warning after redeclaration of a local variable
2005-08-04 11:16 [Bug c/23228] New: Silly "unused variable" warning after redeclaration of a local variable steven at gcc dot gnu dot org
2005-08-04 12:20 ` [Bug c/23228] " gdr at integrable-solutions dot net
2005-08-04 13:04 ` [Bug c/23228] [3.4/4.0/4.1 Regression] " pinskia at gcc dot gnu dot org
@ 2005-08-08 18:19 ` pinskia at gcc dot gnu dot org
2005-09-27 16:17 ` mmitchel at gcc dot gnu dot org
3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-08-08 18:19 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-08-08 18:19 -------
This was introduced between 20020216 and 20020223.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23228
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c/23228] [3.4/4.0/4.1 Regression] Silly "unused variable" warning after redeclaration of a local variable
2005-08-04 11:16 [Bug c/23228] New: Silly "unused variable" warning after redeclaration of a local variable steven at gcc dot gnu dot org
` (2 preceding siblings ...)
2005-08-08 18:19 ` pinskia at gcc dot gnu dot org
@ 2005-09-27 16:17 ` mmitchel at gcc dot gnu dot org
3 siblings, 0 replies; 5+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2005-09-27 16:17 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|4.0.2 |4.0.3
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23228
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2005-09-27 16:17 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-08-04 11:16 [Bug c/23228] New: Silly "unused variable" warning after redeclaration of a local variable steven at gcc dot gnu dot org
2005-08-04 12:20 ` [Bug c/23228] " gdr at integrable-solutions dot net
2005-08-04 13:04 ` [Bug c/23228] [3.4/4.0/4.1 Regression] " pinskia at gcc dot gnu dot org
2005-08-08 18:19 ` pinskia at gcc dot gnu dot org
2005-09-27 16:17 ` mmitchel 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).