diff options
author | Matt Austern <austern@apple.com> | 2004-10-30 21:17:31 +0000 |
---|---|---|
committer | Matt Austern <austern@gcc.gnu.org> | 2004-10-30 21:17:31 +0000 |
commit | 3cabd8f9f1f3b1cf8c1f87fdd104ae574ccfd3c2 (patch) | |
tree | 5c32262faccda1730bfd2d0aea22d1bc725fd315 /gcc/testsuite | |
parent | 46bfe5e30e858fe285762859370a6a90bd1c18ba (diff) | |
download | gcc-3cabd8f9f1f3b1cf8c1f87fdd104ae574ccfd3c2.zip gcc-3cabd8f9f1f3b1cf8c1f87fdd104ae574ccfd3c2.tar.gz gcc-3cabd8f9f1f3b1cf8c1f87fdd104ae574ccfd3c2.tar.bz2 |
re PR c++/17542 (Visibility attribute ignored when it precedes class head)
PR c++/17542
* cp-tree.h (class_key_or_enum_as_string): Declare.
* error.c (class_key_or_enum): Rename to class_key_or_enum_as_string
and remove static qualifier.
* decl.c (shadow_tag): Warn about ignored attributes in class/struct/
union/enum declaration.
* g++.dg/ext/attrib18.C: New test.
From-SVN: r89898
Diffstat (limited to 'gcc/testsuite')
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/ext/attrib18.C | 10 |
2 files changed, 15 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 95e2a9d..3255d47 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2004-10-30 Matt Austern <austern@apple.com> + + PR c++/17542 + * g++.dg/ext/attrib18.C: New test. + 2004-10-30 Roger Sayle <roger@eyesopen.com> PR middle-end/18096 diff --git a/gcc/testsuite/g++.dg/ext/attrib18.C b/gcc/testsuite/g++.dg/ext/attrib18.C new file mode 100644 index 0000000..0c3a072 --- /dev/null +++ b/gcc/testsuite/g++.dg/ext/attrib18.C @@ -0,0 +1,10 @@ +// PR c++/17542 +// Test that we warn when an attribute preceding the class-key is ignored. +// { dg-do compile } + +__attribute__ ((packed)) struct A +{ // { dg-warning "attribute" } + char c; + int x; + void f(); +}; |