OSDN Git Service

03f43f2de8c30d587330554f3464a657630703d7
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / bitfld-15.c
1 /* { dg-do compile } */
2 /* Remove pedantic.  Allow the GCC extension to use char for bitfields.  */
3 /* { dg-options "" } */
4 /* { dg-options "-mno-ms-bitfields" { target i?86-*-netware } } */
5 /* { dg-options "-mno-ms-bitfields -Wno-packed-bitfield-compat" { target { i?86-*-mingw* x86_64-*-mingw* } } } */
6
7 struct t
8 {
9   char a:4;
10   char b:8;
11   char c:4;
12 } __attribute__ ((packed)); /* { dg-message "note: offset of packed bit-field 'b' has changed in GCC 4.4" "" { target pcc_bitfield_type_matters } } */
13
14 int assrt[sizeof (struct t) == 2 ? 1 : -1];