It should be possible to handle this case without tentative parsing or lookahead. Consume the attributes onto a new list; if the next token is a semicolon, then push them into the label's attribute list; otherwise, ParseStatementOrDeclarationAfterAttributes.
What does GCC do if there are #pragmas between the case label and the attribute, and/or between the attribute and the semicolon? On Mon, Sep 30, 2013 at 7:23 AM, Aaron Ballman <[email protected]>wrote: > Ping > > On Mon, Sep 23, 2013 at 7:02 PM, Aaron Ballman <[email protected]> > wrote: > > In C++ mode, attributes following labels can be ambiguous as they > > could apply either to the label, or to a declaration following the > > label. According to > > http://gcc.gnu.org/onlinedocs/gcc/Attribute-Syntax.html, a GNU > > attribute following a label in C++ mode is only legal if the token > > after the attribute is a semicolon. This patch addresses PR8455. > > > > ~Aaron >
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
