diff options
author | H.J. Lu <hongjiu.lu@intel.com> | 2009-02-19 01:58:15 +0000 |
---|---|---|
committer | H.J. Lu <hjl@gcc.gnu.org> | 2009-02-18 17:58:15 -0800 |
commit | 57c2231b2320835b96c6aeff3f2c76d165d4d47b (patch) | |
tree | f0aab9e1a84b567047db64e787d8293069ecdf3f /gcc/cp | |
parent | 525dbc9afb9e6222511256af162d59370a5c6053 (diff) | |
download | gcc-57c2231b2320835b96c6aeff3f2c76d165d4d47b.zip gcc-57c2231b2320835b96c6aeff3f2c76d165d4d47b.tar.gz gcc-57c2231b2320835b96c6aeff3f2c76d165d4d47b.tar.bz2 |
re PR c++/39219 (attribute doesn't work with enums properly)
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.
From-SVN: r144284
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/cp/parser.c | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 3ca03d3..709453d 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 404e45a..ead7d3a 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); |