public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/17820] New: Two kinds of unused warnings
@ 2004-10-03 22:56 jakub at gcc dot gnu dot org
2004-10-03 23:03 ` [Bug c/17820] [4.0 Regression] " pinskia at gcc dot gnu dot org
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: jakub at gcc dot gnu dot org @ 2004-10-03 22:56 UTC (permalink / raw)
To: gcc-bugs
static int a = 10;
static int b = 20;
static int c = 30;
gcc -Wall test.c
./xgcc -B ./ -Wall test.c -S
test.c:3: warning: unused variable 'c'
test.c:2: warning: unused variable 'b'
test.c:1: warning: unused variable 'a'
test.c:1: warning: 'a' defined but not used
test.c:2: warning: 'b' defined but not used
test.c:3: warning: 'c' defined but not used
With -xc++ it emits only the latter 3 warnings, likewise with gcc 3.4.x.
--
Summary: Two kinds of unused warnings
Product: gcc
Version: 4.0.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: jakub at gcc dot gnu dot org
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17820
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c/17820] [4.0 Regression] Two kinds of unused warnings
2004-10-03 22:56 [Bug c/17820] New: Two kinds of unused warnings jakub at gcc dot gnu dot org
@ 2004-10-03 23:03 ` pinskia at gcc dot gnu dot org
2004-10-03 23:19 ` pinskia at gcc dot gnu dot org
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-10-03 23:03 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-10-03 23:03 -------
I have a patch, will post soon.
Confirmed a regression.
--
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |pinskia at gcc dot gnu dot
|dot org |org
Status|UNCONFIRMED |ASSIGNED
Ever Confirmed| |1
Keywords| |diagnostic
Last reconfirmed|0000-00-00 00:00:00 |2004-10-03 23:03:11
date| |
Summary|Two kinds of unused warnings|[4.0 Regression] Two kinds
| |of unused warnings
Target Milestone|--- |4.0.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17820
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c/17820] [4.0 Regression] Two kinds of unused warnings
2004-10-03 22:56 [Bug c/17820] New: Two kinds of unused warnings jakub at gcc dot gnu dot org
2004-10-03 23:03 ` [Bug c/17820] [4.0 Regression] " pinskia at gcc dot gnu dot org
@ 2004-10-03 23:19 ` pinskia at gcc dot gnu dot org
2004-10-04 0:10 ` cvs-commit at gcc dot gnu dot org
2004-10-04 0:10 ` pinskia at gcc dot gnu dot org
3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-10-03 23:19 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-10-03 23:19 -------
Patch here: <http://gcc.gnu.org/ml/gcc-patches/2004-10/msg00217.html>.
--
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |patch
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17820
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c/17820] [4.0 Regression] Two kinds of unused warnings
2004-10-03 22:56 [Bug c/17820] New: Two kinds of unused warnings jakub at gcc dot gnu dot org
2004-10-03 23:03 ` [Bug c/17820] [4.0 Regression] " pinskia at gcc dot gnu dot org
2004-10-03 23:19 ` pinskia at gcc dot gnu dot org
@ 2004-10-04 0:10 ` cvs-commit at gcc dot gnu dot org
2004-10-04 0:10 ` pinskia at gcc dot gnu dot org
3 siblings, 0 replies; 5+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-10-04 0:10 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-10-04 00:10 -------
Fixed.
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2004-10-04 00:10 -------
Subject: Bug 17820
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: pinskia@gcc.gnu.org 2004-10-04 00:10:11
Modified files:
gcc/testsuite/gcc.dg: unused-4.c
gcc/testsuite : ChangeLog
gcc : ChangeLog c-decl.c
Added files:
gcc/testsuite/gcc.dg: unused-7.c
Log message:
2004-10-03 Andrew Pinski <pinskia@physics.uc.edu>
PR c/17178, PR c/17820
* c-decl.c (pop_scope): Do not warn about unused static
variables as they warned in the middle-end.
2004-10-03 Andrew Pinski <pinskia@physics.uc.edu>
PR c/17178
* gcc.dg/unused-4.c: Adjust to be correct.
PR c/17820
* gcc.dg/unused-7.c: New test.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/unused-7.c.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/unused-4.c.diff?cvsroot=gcc&r1=1.3&r2=1.4
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.4376&r2=1.4377
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.5735&r2=2.5736
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/c-decl.c.diff?cvsroot=gcc&r1=1.594&r2=1.595
--
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17820
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c/17820] [4.0 Regression] Two kinds of unused warnings
2004-10-03 22:56 [Bug c/17820] New: Two kinds of unused warnings jakub at gcc dot gnu dot org
` (2 preceding siblings ...)
2004-10-04 0:10 ` cvs-commit at gcc dot gnu dot org
@ 2004-10-04 0:10 ` pinskia at gcc dot gnu dot org
3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-10-04 0:10 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-10-04 00:10 -------
Fixed.
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2004-10-04 00:10 -------
Subject: Bug 17820
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: pinskia@gcc.gnu.org 2004-10-04 00:10:11
Modified files:
gcc/testsuite/gcc.dg: unused-4.c
gcc/testsuite : ChangeLog
gcc : ChangeLog c-decl.c
Added files:
gcc/testsuite/gcc.dg: unused-7.c
Log message:
2004-10-03 Andrew Pinski <pinskia@physics.uc.edu>
PR c/17178, PR c/17820
* c-decl.c (pop_scope): Do not warn about unused static
variables as they warned in the middle-end.
2004-10-03 Andrew Pinski <pinskia@physics.uc.edu>
PR c/17178
* gcc.dg/unused-4.c: Adjust to be correct.
PR c/17820
* gcc.dg/unused-7.c: New test.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/unused-7.c.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/unused-4.c.diff?cvsroot=gcc&r1=1.3&r2=1.4
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.4376&r2=1.4377
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.5735&r2=2.5736
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/c-decl.c.diff?cvsroot=gcc&r1=1.594&r2=1.595
--
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17820
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2004-10-04 0:10 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-10-03 22:56 [Bug c/17820] New: Two kinds of unused warnings jakub at gcc dot gnu dot org
2004-10-03 23:03 ` [Bug c/17820] [4.0 Regression] " pinskia at gcc dot gnu dot org
2004-10-03 23:19 ` pinskia at gcc dot gnu dot org
2004-10-04 0:10 ` cvs-commit at gcc dot gnu dot org
2004-10-04 0:10 ` 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).