* decl2.c (get_guard): Check DECL_FUNCTION_SCOPE_P.
authorJason Merrill <jason@redhat.com>
Thu, 21 Sep 2000 21:47:55 +0000 (17:47 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Thu, 21 Sep 2000 21:47:55 +0000 (17:47 -0400)
From-SVN: r36566

gcc/cp/ChangeLog
gcc/cp/decl2.c

index 222b0158f8d0dc78f72d02ccee851e4671e4a0cc..c56941336d87c3746319130c7ac5eb26e07bfa66 100644 (file)
@@ -1,3 +1,7 @@
+2000-09-20  Jason Merrill  <jason@redhat.com>
+
+       * decl2.c (get_guard): Check DECL_FUNCTION_SCOPE_P.
+
 2000-09-21  Andreas Jaeger  <aj@suse.de>
 
        * errfn.c: Move declaration of cp_printer and cp_printers to ...
index a530c3284ee50fb6d5a13e764c39c29e7809f860..a9dc4132fa3bbae9e260a4b3b45b80977f54f6bb 100644 (file)
@@ -2868,7 +2868,7 @@ get_guard (decl)
 
   /* For a local variable, under the old ABI, we do not try to get a
      unique mangled name for the DECL.  */
-  if (!flag_new_abi && !DECL_NAMESPACE_SCOPE_P (decl))
+  if (!flag_new_abi && DECL_FUNCTION_SCOPE_P (decl))
     {
       guard = get_temp_name (integer_type_node);
       cp_finish_decl (guard, NULL_TREE, NULL_TREE, 0);