2 /* { dg-do compile } */
3 /* { dg-options "-O0" } */
5 int foo1 __attribute__((warn_if_not_aligned(8))); /* { dg-error "'warn_if_not_aligned' may not be specified for 'foo1'" } */
7 __attribute__((warn_if_not_aligned(8)))
9 foo2 (void) /* { dg-error "'warn_if_not_aligned' may not be specified for 'void foo2\\(\\)'" } */
15 int i : 2 __attribute__((warn_if_not_aligned(8))); /* { dg-error "'warn_if_not_aligned' may not be specified for 'i'" } */
18 typedef unsigned int __u32
19 __attribute__((aligned(4),warn_if_not_aligned(8)));
23 __u32 i : 2; /* { dg-error "cannot declare bit-field 'i' with 'warn_if_not_aligned' type" } */