Debian Codegraph @

gcc/testsuite/g++.old-deja/g++.brendan/sizeof2.C

raw
1 // { dg-do assemble }
2 // { dg-options "-pedantic-errors" }
3 // GROUPS passed sizeof
4 // ARM $5.3.2
5
6 void f() { }
7
8 struct foo { int bit : 1; };
9
10 int
11 main()
12 {
13 // sizeof may not be applied to a bit-field
14 foo f;
15 int i = sizeof (f.bit);// { dg-error "21:invalid application" } .*
16
17 return 0;
18 }