From 8a7b5cc43da48f71688c112b062a86b78bf8d156 Mon Sep 17 00:00:00 2001 From: Hans-Peter Nilsson Date: Thu, 1 Dec 2005 01:24:16 +0000 Subject: [PATCH] 20041106-1.c, [...]: Match "attribute ignored" warnings when "packing" is the same as the ABI layout. * gcc.dg/20041106-1.c, gcc.dg/20030321-1.c, gcc.dg/pr17112-1.c, gcc.dg/pr17112-1.c, g++.dg/other/packed1.C, g++.dg/other/crash-4.C, g++.dg/ext/packed8.C: Match "attribute ignored" warnings when "packing" is the same as the ABI layout. From-SVN: r107758 --- gcc/testsuite/ChangeLog | 7 +++++++ gcc/testsuite/g++.dg/ext/packed8.C | 2 +- gcc/testsuite/g++.dg/other/crash-4.C | 2 +- gcc/testsuite/g++.dg/other/packed1.C | 6 +++++- gcc/testsuite/gcc.dg/20030321-1.c | 2 +- gcc/testsuite/gcc.dg/20041106-1.c | 2 +- gcc/testsuite/gcc.dg/pr17112-1.c | 2 +- 7 files changed, 17 insertions(+), 6 deletions(-) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 2f0f297ca5c..aa543db2038 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2005-12-01 Hans-Peter Nilsson + + * gcc.dg/20041106-1.c, gcc.dg/20030321-1.c, gcc.dg/pr17112-1.c, + gcc.dg/pr17112-1.c, g++.dg/other/packed1.C, + g++.dg/other/crash-4.C, g++.dg/ext/packed8.C: Match "attribute + ignored" warnings when "packing" is the same as the ABI layout. + 2005-11-30 Bernhard Fischer PR fortran/21302 diff --git a/gcc/testsuite/g++.dg/ext/packed8.C b/gcc/testsuite/g++.dg/ext/packed8.C index 13fc134bd97..1f86cfc0a69 100644 --- a/gcc/testsuite/g++.dg/ext/packed8.C +++ b/gcc/testsuite/g++.dg/ext/packed8.C @@ -15,7 +15,7 @@ public: class B { - A a __attribute__((packed)); + A a __attribute__((packed)); // { dg-warning "attribute ignored" "" { target default_packed } } public: B() {} diff --git a/gcc/testsuite/g++.dg/other/crash-4.C b/gcc/testsuite/g++.dg/other/crash-4.C index ea5a14fa7ae..a37b8b2f020 100644 --- a/gcc/testsuite/g++.dg/other/crash-4.C +++ b/gcc/testsuite/g++.dg/other/crash-4.C @@ -17,7 +17,7 @@ struct a struct b { // { dg-error "cannot bind packed field" "" { target { ! default_packed } } } char c; - a aa __attribute__((packed)); + a aa __attribute__((packed)); // { dg-warning "attribute ignored" "" { target default_packed } } }; struct c { diff --git a/gcc/testsuite/g++.dg/other/packed1.C b/gcc/testsuite/g++.dg/other/packed1.C index d4422092271..5d19eb0e2a7 100644 --- a/gcc/testsuite/g++.dg/other/packed1.C +++ b/gcc/testsuite/g++.dg/other/packed1.C @@ -11,7 +11,11 @@ struct thing { int m; }; -struct pod {char a; thing m __attribute__ ((packed)); }; +struct pod + { + char a; + thing m __attribute__ ((packed)); // { dg-warning "attribute ignored" "" { target default_packed } } + }; int main () { diff --git a/gcc/testsuite/gcc.dg/20030321-1.c b/gcc/testsuite/gcc.dg/20030321-1.c index 228acec5471..1150c7f7619 100644 --- a/gcc/testsuite/gcc.dg/20030321-1.c +++ b/gcc/testsuite/gcc.dg/20030321-1.c @@ -7,7 +7,7 @@ struct array { char align[4092]; - long long elem[2] __attribute__ ((__packed__)); + long long elem[2] __attribute__ ((__packed__)); /* { dg-warning "attribute ignored" "" { target default_packed } } */ }; long long diff --git a/gcc/testsuite/gcc.dg/20041106-1.c b/gcc/testsuite/gcc.dg/20041106-1.c index 538f2dd8eb5..f83e835ed1d 100644 --- a/gcc/testsuite/gcc.dg/20041106-1.c +++ b/gcc/testsuite/gcc.dg/20041106-1.c @@ -6,7 +6,7 @@ #include #include -struct S { long x __attribute__((packed)); }; +struct S { long x __attribute__((packed)); }; /* { dg-warning "attribute ignored" "" { target default_packed } } */ volatile long sink; void foo (struct S *s) diff --git a/gcc/testsuite/gcc.dg/pr17112-1.c b/gcc/testsuite/gcc.dg/pr17112-1.c index 7c8b7aa0432..09c3758abed 100644 --- a/gcc/testsuite/gcc.dg/pr17112-1.c +++ b/gcc/testsuite/gcc.dg/pr17112-1.c @@ -5,7 +5,7 @@ extern void abort(void); typedef struct { - int int24:24 __attribute__ ((packed)); + int int24:24 __attribute__ ((packed)); /* { dg-warning "attribute ignored" "" { target { default_packed && { ! pcc_bitfield_type_matters } } } } */ } myint24; myint24 x[3] = {