Nasty parsing bug?

Abramo Bagnara abramo.bagnara at
Thu Aug 7 02:39:51 PDT 2014

In the following source

enum e { a };
enum e __attribute__((unused)) x;
enum e
__attribute__((unused)) y;

the declaration of x is parsed without errors, but the declaration of y
gives a parse error i.e. the presence of the newline makes a difference (!)

Indeed I cannot imagine a reason why the parsing should be influenced by
token position.

Opinions anyone?

More information about the cfe-commits mailing list