Debian Codegraph @

gcc/testsuite/g++.dg/ext/bitfield9.C

raw
1 // { dg-do compile { target c++11 } }
2 // { dg-options "-pedantic" }
3
4 struct S
5 {
6 char a:4; // { dg-warning "alignas' on bit-field" "" { target *-*-* } .+1 }
7 char b:8 alignas(int); // { dg-warning "ISO C\\+\\+ allows bit-field attributes only before the ':' token" }
8 char c:8 [[gnu::aligned(8)]]; // { dg-warning "ISO C\\+\\+ allows bit-field attributes only before the ':' token" }
9 // { dg-error "two consecutive '\\\[' shall only introduce an attribute before '\\\[' token" "" { target *-*-* } .-1 }
10 };