diff options
| author | hjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-02-19 01:58:15 +0000 |
|---|---|---|
| committer | hjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-02-19 01:58:15 +0000 |
| commit | 07dd13870dfa40944eb4478f1b8bfce021556080 (patch) | |
| tree | f0aab9e1a84b567047db64e787d8293069ecdf3f | |
| parent | 971d8544e1052d6aa040eda68f3aa6d6d9587c11 (diff) | |
| download | ppe42-gcc-07dd13870dfa40944eb4478f1b8bfce021556080.tar.gz ppe42-gcc-07dd13870dfa40944eb4478f1b8bfce021556080.zip | |
gcc/cp
2009-02-18 H.J. Lu <hongjiu.lu@intel.com>
PR c++/39219
* parser.c (cp_parser_enum_specifier): Apply all attributes.
gcc/testsuite/
2009-02-18 H.J. Lu <hongjiu.lu@intel.com>
PR c++/39219
* g++.dg/parse/attr3.C: New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@144284 138bc75d-0d04-0410-961f-82ee72b054a4
| -rw-r--r-- | gcc/cp/ChangeLog | 5 | ||||
| -rw-r--r-- | gcc/cp/parser.c | 1 | ||||
| -rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
| -rw-r--r-- | gcc/testsuite/g++.dg/parse/attr3.C | 14 |
4 files changed, 25 insertions, 0 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 3ca03d37a3a..709453d91ff 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2009-02-18 H.J. Lu <hongjiu.lu@intel.com> + + PR c++/39219 + * parser.c (cp_parser_enum_specifier): Apply all attributes. + 2009-02-18 Jason Merrill <jason@redhat.com> * cfns.h: Tweak pathname for cfns.gperf. diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index 404e45a14c6..ead7d3a3907 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -11916,6 +11916,7 @@ cp_parser_enum_specifier (cp_parser* parser) if (cp_parser_allow_gnu_extensions_p (parser)) { tree trailing_attr = cp_parser_attributes_opt (parser); + trailing_attr = chainon (trailing_attr, attributes); cplus_decl_attributes (&type, trailing_attr, (int) ATTR_FLAG_TYPE_IN_PLACE); diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 0605ccbe0ce..bd0c95cc6ba 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2009-02-18 H.J. Lu <hongjiu.lu@intel.com> + + PR c++/39219 + * g++.dg/parse/attr3.C: New. + 2009-02-18 Jack Howarth <howarth@bromo.med.uc.edu> PR testsuite/38165 diff --git a/gcc/testsuite/g++.dg/parse/attr3.C b/gcc/testsuite/g++.dg/parse/attr3.C new file mode 100644 index 00000000000..848df055ced --- /dev/null +++ b/gcc/testsuite/g++.dg/parse/attr3.C @@ -0,0 +1,14 @@ +// PR c++/39219 + +enum __attribute__ ((deprecated)) E { e }; +struct S { enum __attribute__ ((deprecated)) F { f = e }; }; + +int main () { + E x; // { dg-warning "'E' is deprecated" "" } + x = e; + + S::F y; // { dg-warning "'F' is deprecated" "" } + y = S::f; + + return x + y; +} |

