Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/g++.dg/template/crash2.C @ 111:04ced10e8804
gcc 7
author | kono |
---|---|
date | Fri, 27 Oct 2017 22:46:09 +0900 |
parents | |
children |
rev | line source |
---|---|
111 | 1 // { dg-options "" } |
2 | |
3 template <class EnumType> | |
4 class A | |
5 { | |
6 public: | |
7 static const EnumType size = max; // { dg-error "" } | |
8 int table[size]; // { dg-error "constant" } | |
9 }; | |
10 template <class EnumType> | |
11 const EnumType A<EnumType>::size; | |
12 | |
13 | |
14 namespace N | |
15 { | |
16 enum E { max = 5 }; | |
17 | |
18 struct B | |
19 { | |
20 A<E> a; | |
21 }; | |
22 | |
23 } | |
24 | |
25 int | |
26 main() | |
27 { | |
28 N::B b; | |
29 | |
30 return 0; | |
31 } |