summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/parse/error10.C
blob: 8301172adbeabc98a0708f02e54d4a7256519f2b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// PR c++/3478
// { dg-options "-fshow-column" }

template <typename> struct A
{
    enum E {};
};

template <typename T> void foo()
{
  enum          A<void>::E e1;
  typename      A<T>::E    e2;
  enum          A<T>::E    e3;
  enum typename A<T>::E    e4;
}

// Here, columns nums are not very accurate either. Still acceptable though
// { dg-error "30:invalid type in declaration before ';' token" "" { target *-*-* } 14 }
// { dg-error "30:two or more data types in declaration of 'e4'" "" { target *-*-* } 14 }