PR c++/86728 - C variadic generic lambda.
[official-gcc.git] / gcc / testsuite / g++.dg / init / bitfield1.C
blob70a06d0e144569db4d1b3ca6c1e9b62d5be38b4f
1 // Check that we handle bitfields as complex lvalues properly.
3 struct A
5   int i: 2;
6   int j: 2;
7   int k: 2;
8 };
10 A a, a2;
11 bool b;
12 void f ();
14 int main ()
16   (f(), a.j) = 1;
17   (f(), a).j = 2; // { dg-warning "overflow" } 
18   (b ? a.j : a2.k) = 3; // { dg-warning "overflow" } 
19   (b ? a : a2).j = 0;
20   ++(a.j) = 1;
21   (a.j = 2) = 3; // { dg-warning "overflow" } 
24