* c-decl.c (poplevel): Invoke warn_about_unused_variables.
authorRichard Henderson <rth@cygnus.com>
Tue, 19 Sep 2000 07:59:58 +0000 (00:59 -0700)
committerRichard Henderson <rth@gcc.gnu.org>
Tue, 19 Sep 2000 07:59:58 +0000 (00:59 -0700)
From-SVN: r36531

gcc/ChangeLog
gcc/c-decl.c

index 14e0651145dabdc9f7ac66f23d079069a3ef7f31..79da6a32bcb6a32410699bd2f1b84d6980cf6ddd 100644 (file)
@@ -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.
 
index 11c235f6b523128ffcddf7c04fc1b00cf4a2e1a2..c892719855f91947e0d582bca6ef65f8b0344819 100644 (file)
@@ -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.  */