aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Henderson <rth@cygnus.com>2000-09-19 00:59:58 -0700
committerRichard Henderson <rth@gcc.gnu.org>2000-09-19 00:59:58 -0700
commit8e5a0fcb7520eb7a21aab9c6b06bf488d4314698 (patch)
treefc3367285c98c5a1260863ad36d4ccdabd0b25ca /gcc
parent0b534c3f27b1061f2a8fce937f0cefd2afaa617f (diff)
downloadgcc-8e5a0fcb7520eb7a21aab9c6b06bf488d4314698.zip
gcc-8e5a0fcb7520eb7a21aab9c6b06bf488d4314698.tar.gz
gcc-8e5a0fcb7520eb7a21aab9c6b06bf488d4314698.tar.bz2
* c-decl.c (poplevel): Invoke warn_about_unused_variables.
From-SVN: r36531
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog2
-rw-r--r--gcc/c-decl.c6
2 files changed, 8 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 14e0651..79da6a3 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,7 @@
2000-09-19 Richard Henderson <rth@cygnus.com>
+ * c-decl.c (poplevel): Invoke warn_about_unused_variables.
+
* unroll.c (copy_loop_body): Update LABEL_NUSES before
calling invert_jump.
diff --git a/gcc/c-decl.c b/gcc/c-decl.c
index 11c235f..c892719 100644
--- a/gcc/c-decl.c
+++ b/gcc/c-decl.c
@@ -1100,6 +1100,12 @@ poplevel (keep, reverse, functionbody)
TREE_ADDRESSABLE (DECL_ABSTRACT_ORIGIN (decl)) = 1;
}
+ /* We used to warn about unused variables in expand_end_bindings,
+ i.e. while generating RTL. But in function-at-a-time mode we may
+ choose to never expand a function at all (e.g. auto inlining), so
+ we do this explicitly now. */
+ warn_about_unused_variables (getdecls ());
+
/* If there were any declarations or structure tags in that level,
or if this level is a function body,
create a BLOCK to record them for the life of this function. */