Mercurial > hg > CbC > CbC_gcc
comparison gcc/testsuite/gcc.dg/Wpadded.c @ 111:04ced10e8804
gcc 7
author | kono |
---|---|
date | Fri, 27 Oct 2017 22:46:09 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
68:561a7518be6b | 111:04ced10e8804 |
---|---|
1 /* Source: EMC. */ | |
2 | |
3 /* { dg-do compile } */ | |
4 /* -fpack-struct is necessary because the warning expected requires the initial | |
5 packing to be larger than 1, which cannot be guaranteed for all targets. | |
6 We won't get a warning anyway if the target has "packed" structure | |
7 layout. */ | |
8 /* { dg-options "-Wpadded -fpack-struct=8" } */ | |
9 /* { dg-additional-options "-mno-ms-bitfields" { target *-*-mingw* } } */ | |
10 | |
11 struct foo { | |
12 char bar; | |
13 long baz; /* { dg-warning "padding struct to align" "" { target { ! default_packed } } } */ | |
14 } futz; |