Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/gcc.dg/pr53037-4.c @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children |
line wrap: on
line source
/* PR c/53037. */ /* { dg-do compile } */ /* { dg-options "-O0" } */ int foo1 __attribute__((warn_if_not_aligned(8))); /* { dg-error "'warn_if_not_aligned' may not be specified for 'foo1'" } */ __attribute__((warn_if_not_aligned(8))) void foo2 (void) /* { dg-error "'warn_if_not_aligned' may not be specified for 'foo2'" } */ { } struct foo3 { int i : 2 __attribute__((warn_if_not_aligned(8))); /* { dg-error "'warn_if_not_aligned' may not be specified for 'i'" } */ }; typedef unsigned int __u32 __attribute__((aligned(4),warn_if_not_aligned(8))); struct foo4 { __u32 i : 2; /* { dg-error "cannot declare bit-field 'i' with 'warn_if_not_aligned' type" } */ };