decl.c (start_enum): Put local enums on permanant_obstack.
authorBenjamin Kosnik <bkoz@gcc.gnu.org>
Thu, 25 Jun 1998 15:31:54 +0000 (15:31 +0000)
committerBenjamin Kosnik <bkoz@gcc.gnu.org>
Thu, 25 Jun 1998 15:31:54 +0000 (15:31 +0000)
8
1998-06-25  Benjamin Kosnik  <bkoz@lisa.cygnus.com>
* decl.c (start_enum): Put local enums on permanant_obstack.
g++/11580

From-SVN: r20721

gcc/cp/decl.c

index 885acac9e076e535664bafd22cf488427d6796fe..b5d8f7b10682b09dfc327d4eb4aed14648a119d3 100644 (file)
@@ -11427,8 +11427,13 @@ start_enum (name)
   register tree enumtype = NULL_TREE;
   struct binding_level *b = inner_binding_level;
 
+  /* We are wasting space here and putting these on the permanant_obstack so
+     that typeid(local enum) will work correctly. */
+#if 0
   if (processing_template_decl && current_function_decl)
-    end_temporary_allocation ();
+#endif
+   
+  end_temporary_allocation ();
 
   /* If this is the real definition for a previous forward reference,
      fill in the contents in the same object that used to be the