pt.c (push_template_decl_real): Use template declaration from class type if it exists.
authorMark Mitchell <mmitchel@gcc.gnu.org>
Mon, 30 Aug 1999 05:36:00 +0000 (05:36 +0000)
committerMark Mitchell <mmitchel@gcc.gnu.org>
Mon, 30 Aug 1999 05:36:00 +0000 (05:36 +0000)
* pt.c (push_template_decl_real): Use template declaration from
class type if it exists.

From-SVN: r28979

gcc/testsuite/g++.old-deja/g++.ns/template13.C

index 193451e3d08e0aff606317d83c2849067836c73d..c1bca73140c78941d6b396329e09c6e82c7808d6 100644 (file)
@@ -4,7 +4,7 @@ namespace bar
 {
   template<class T>
   void foo(); // trick it to provide some prior declaration
-  template<class T>class X;
+  template<class T>class X; // ERROR - previous declaration
 }
 
 template <typename T>
@@ -19,4 +19,4 @@ template<> void bar::foo<int>()
 }
 
 template<class T,class U>
-class bar::X{};         // ERROR - does not match declaration - XFAIL *-*-*
+class bar::X{};         // ERROR - does not match declaration