diff options
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.ns/template13.C')
-rw-r--r-- | gcc/testsuite/g++.old-deja/g++.ns/template13.C | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.ns/template13.C b/gcc/testsuite/g++.old-deja/g++.ns/template13.C index d7e4b797094..46555387af3 100644 --- a/gcc/testsuite/g++.old-deja/g++.ns/template13.C +++ b/gcc/testsuite/g++.old-deja/g++.ns/template13.C @@ -1,22 +1,23 @@ -// { dg-do assemble { xfail *-*-* } } +// { dg-do compile } // Templates defined outside must be declared inside namespace bar { + // trick it to provide some prior declaration template<class T> - void foo(); // trick it to provide some prior declaration - template<class T>class X; // { dg-error "" } previous declaration + void foo(); // { dg-error "definition" } + template<class T>class X; // { dg-error "previous declaration" } } template <typename T> T const -bar::foo(T const &a) -{ // { dg-error "" "" { xfail *-*-* } } not declared in bar - +bar::foo(T const &a) // { dg-error "" "" { xfail *-*-* } } not declared in bar - +{ return a; } -template<> void bar::foo<int>() -{ // { dg-error "" "" { xfail *-*-* } } not declared in bar - +template<> void bar::foo<int>() // { dg-error "different namespace" } +{ } template<class T,class U> -class bar::X{}; // { dg-error "" } does not match declaration +class bar::X{}; // { dg-error "1 template parameter" } |