annotate gcc/testsuite/g++.dg/ext/underlying_type1.C @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 // { dg-do compile }
kono
parents:
diff changeset
2
kono
parents:
diff changeset
3 struct B { };
kono
parents:
diff changeset
4 union U { };
kono
parents:
diff changeset
5
kono
parents:
diff changeset
6 template<typename T>
kono
parents:
diff changeset
7 struct underlying_type
kono
parents:
diff changeset
8 { typedef __underlying_type(T) type; }; // { dg-error "not an enumeration" }
kono
parents:
diff changeset
9
kono
parents:
diff changeset
10 __underlying_type(int) i1; // { dg-error "not an enumeration|invalid" }
kono
parents:
diff changeset
11 __underlying_type(A) i2; // { dg-error "expected|type" }
kono
parents:
diff changeset
12 __underlying_type(B) i3; // { dg-error "not an enumeration|invalid" }
kono
parents:
diff changeset
13 __underlying_type(U) i4; // { dg-error "not an enumeration|invalid" }
kono
parents:
diff changeset
14
kono
parents:
diff changeset
15 underlying_type<int>::type i5;
kono
parents:
diff changeset
16 underlying_type<A>::type i6; // { dg-error "not declared|template|expected" }
kono
parents:
diff changeset
17 underlying_type<B>::type i7;
kono
parents:
diff changeset
18 underlying_type<U>::type i8;