From 62479b5aadf80f84365f7d305fcd1ae7da1a73d5 Mon Sep 17 00:00:00 2001 From: hp Date: Mon, 9 Jan 2006 04:47:07 +0000 Subject: [PATCH] * gcc.dg/Wpadded.c: Gate alignment warning on ! default_packed. Fix typo in comment. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@109496 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gcc.dg/Wpadded.c | 6 ++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index e29aa6e..eac71e9 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2006-01-09 Hans-Peter Nilsson + + * gcc.dg/Wpadded.c: Gate alignment warning on ! default_packed. + Fix typo in comment. + 2006-01-09 Feng Wang * gfortran.dg/single_char_string.f90: New test. diff --git a/gcc/testsuite/gcc.dg/Wpadded.c b/gcc/testsuite/gcc.dg/Wpadded.c index e55fd11..9e69a9f 100644 --- a/gcc/testsuite/gcc.dg/Wpadded.c +++ b/gcc/testsuite/gcc.dg/Wpadded.c @@ -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; -- 2.7.4