This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [C++] PATCH for 13170 to class attribute handling


Jason Merrill wrote:

PR 13170 is caused by the parser temporarily storing attributes specified
in the class head in TYPE_ATTRIBUTES, and then removing them later if they
don't apply.  As a result, we were winding up with variants both with and
without the attribute, causing confusion and death.

This patch changes the parser to store the class head attributes in a local
variable in cp_parser_class_specifier rather than in the type itself.  As a
side-effect, we can remove the attribute handling from xref_tag, where it
really doesn't belong.

Tested x86_64-pc-linux-gnu, applied to trunk and 3.4.  Test in
g++.dg/ext/attrib14.C.

Groovy! Thanks,

--
Mark Mitchell
CodeSourcery, LLC
(916) 791-8304
mark@codesourcery.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]