Wpadded.c: Gate alignment warning on ! default_packed.
authorHans-Peter Nilsson <hp@axis.com>
Mon, 9 Jan 2006 04:47:07 +0000 (04:47 +0000)
committerHans-Peter Nilsson <hp@gcc.gnu.org>
Mon, 9 Jan 2006 04:47:07 +0000 (04:47 +0000)
* gcc.dg/Wpadded.c: Gate alignment warning on ! default_packed.
Fix typo in comment.

From-SVN: r109496

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/Wpadded.c

index e29aa6e78990e0a17dbb7391a4faa82f1b6f963f..eac71e9ac63de740363baa1b054abbcd7de239c7 100644 (file)
@@ -1,3 +1,8 @@
+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.
index e55fd113f7576d67822331ec9f057bb5f22701d1..9e69a9fef50f700e90a3c70b8d33e49d4b9efdf4 100644 (file)
@@ -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;