aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-decl.c
diff options
context:
space:
mode:
authorAndrew Pinski <pinskia@physics.uc.edu>2004-10-04 00:10:07 +0000
committerAndrew Pinski <pinskia@gcc.gnu.org>2004-10-03 17:10:07 -0700
commit2912815478ebebe4530e39b43fb7cec1d784c782 (patch)
tree19f432e3d466caa504ff7e5add01c68bd94a56ee /gcc/c-decl.c
parentef7eaebfc6a4cf1b738efe18b2740b3bc8e470e8 (diff)
downloadgcc-2912815478ebebe4530e39b43fb7cec1d784c782.zip
gcc-2912815478ebebe4530e39b43fb7cec1d784c782.tar.gz
gcc-2912815478ebebe4530e39b43fb7cec1d784c782.tar.bz2
PR c/17178, PR c/17820
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. From-SVN: r88467
Diffstat (limited to 'gcc/c-decl.c')
-rw-r--r--gcc/c-decl.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/gcc/c-decl.c b/gcc/c-decl.c
index df61736..cd003a3 100644
--- a/gcc/c-decl.c
+++ b/gcc/c-decl.c
@@ -767,10 +767,8 @@ pop_scope (void)
&& !DECL_IN_SYSTEM_HEADER (p)
&& DECL_NAME (p)
&& !DECL_ARTIFICIAL (p)
- && (scope != file_scope
- || (TREE_STATIC (p) && !TREE_PUBLIC (p)
- && !TREE_THIS_VOLATILE (p)))
- && scope != external_scope)
+ && scope != file_scope
+ && scope != external_scope)
warning ("%Junused variable %qD", p, p);
if (b->inner_comp)