summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.pt/redecl1.C
blob: 4a580e177424050f9a99c5a8723d2861a1b3d7df (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// { dg-do assemble  }

template <class T>
struct S1; // { dg-message "previous declaration" } 

template <class T, class U>
struct S1 {}; // { dg-error "redeclared" } used 1 template parameter

template <class T = int> // { dg-message "original definition" }
struct S2; 

template <class T = int>
struct S2; // { dg-error "redefinition of default" } 

template <class T> // { dg-error "template parameter" } 
struct S3;

template <int I>
struct S3; // { dg-error "redeclared here" } 

template <template <class T> class C>
struct S3; // { dg-error "redeclared here" }