pt.c (instantiate_decl): Call cp_finish_decl for vars even if we don't define them...
authorJason Merrill <jason@yorick.cygnus.com>
Sat, 7 Feb 1998 17:14:22 +0000 (17:14 +0000)
committerJason Merrill <jason@gcc.gnu.org>
Sat, 7 Feb 1998 17:14:22 +0000 (12:14 -0500)
* pt.c (instantiate_decl): Call cp_finish_decl for vars even if we
don't define them yet.

From-SVN: r17763

gcc/cp/ChangeLog
gcc/cp/pt.c

index 9970f9d074060c5adaf6d868e94bd2e6fca40ce3..eac96d2fafb8a9c7aa5ff8eb9e6f4e785603b700 100644 (file)
@@ -1,4 +1,7 @@
-Sat Feb  7 15:15:57 1998  Jason Merrill  <jason@yorick.cygnus.com>
+Sat Feb  7 16:48:54 1998  Jason Merrill  <jason@yorick.cygnus.com>
+
+       * pt.c (instantiate_decl): Call cp_finish_decl for vars even if we
+       don't define them yet.
 
        * parse.y (nomods_initdcl0): Add constructor_declarator case.
 
index 508719a59abd9b1384d9d7cc58b49d4fd27ea267..1176a5de4cdf478d246b441dda68eedc9a29ec9f 100644 (file)
@@ -5697,7 +5697,7 @@ instantiate_decl (d)
       pushclass (DECL_CONTEXT (d), 2);
       DECL_INITIAL (d) = tsubst_expr (DECL_INITIAL (code_pattern), args,
                                      TREE_VEC_LENGTH (args), tmpl);
-      popclass (1);
+      cp_finish_decl (d, DECL_INITIAL (d), NULL_TREE, 0, LOOKUP_NORMAL);
     }
 
   if (pattern_defined)