OSDN Git Service

PR c++/53549
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.dg / parse / bitfield2.C
1 //PR c++/28053
2
3 struct X {};
4
5 struct A
6 {
7     X x : 2;            // { dg-error "non-integral type" }
8 };
9 struct B : A {};
10
11 template <typename T>
12 struct C
13 {
14   T t : 3;
15 };
16
17 C<int> c;
18
19 template <typename T>
20 struct D
21 {
22   T t : 3;              // { dg-error "non-integral type" }
23 };
24
25 D<double> d;            // { dg-message "required" }
26
27 template <typename T>
28 struct E
29 {
30   typedef T* U;
31   U t : 3;             // { dg-error "non-integral type" }
32 };
33
34 E<double> e;