2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.brendan / sizeof2.C
blob355bee74645f4f9664269a4b30212fb95f9841b0
1 // { dg-do assemble  }
2 // { dg-options "-pedantic-errors" }
3 // GROUPS passed sizeof
4 // ARM $5.3.2
6 void f() { }
8 struct foo { int bit : 1; };
10 int
11 main()
13   // sizeof may not be applied to a bit-field
14   foo f;
15   int i = sizeof (f.bit);// { dg-error "" } .*
17   return 0;