view gcc/testsuite/gcc.dg/Wpadded.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

/* Source: EMC.  */

/* { dg-do compile } */
/* -fpack-struct is necessary because the warning expected requires the initial
   packing to be larger than 1, which cannot be guaranteed for all targets.
   We won't get a warning anyway if the target has "packed" structure
   layout.  */
/* { dg-options "-Wpadded -fpack-struct=8" } */
/* { dg-additional-options "-mno-ms-bitfields" { target *-*-mingw* } } */

struct foo {
  char bar;
  long baz; /* { dg-warning "padding struct to align" ""  { target { ! default_packed } } } */
} futz;