Commit 5109f57e by Hans-Peter Nilsson Committed by Hans-Peter Nilsson

Wpadded.c: Gate alignment warning on ! default_packed.

	* gcc.dg/Wpadded.c: Gate alignment warning on ! default_packed.
	Fix typo in comment.

From-SVN: r109496
parent 26ba43b9
2006-01-09 Hans-Peter Nilsson <hp@axis.com>
* gcc.dg/Wpadded.c: Gate alignment warning on ! default_packed.
Fix typo in comment.
2006-01-09 Feng Wang <fengwang@nudt.edu.cn>
* gfortran.dg/single_char_string.f90: New test.
......@@ -2,10 +2,12 @@
/* { dg-do compile } */
/* -fpack-struct is necessary because the warning expected requires the initial
packing to be larger than 1, which cannot ge guaranteed for all targets. */
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" } */
struct foo {
char bar;
long baz; /* { dg-warning "padding struct to align" } */
long baz; /* { dg-warning "padding struct to align" "" { target { ! default_packed } } } */
} futz;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment