[PATCH] Attribute parsing following labels

Richard Smith richard at metafoo.co.uk
Mon Sep 30 15:03:11 PDT 2013

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,

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 <aaron at aaronballman.com>wrote:

> Ping
> On Mon, Sep 23, 2013 at 7:02 PM, Aaron Ballman <aaron at aaronballman.com>
> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130930/c7ac847a/attachment.html>

More information about the cfe-commits mailing list