On 05/13/2011 01:53 PM, Ville Voutilainen wrote:
On 13 May 2011 20:46, Jason Merrill<ja...@redhat.com>  wrote:
Why did you put this before the invalid template-id check, rather than
after?

For no particular reason. Is it significant?

Yes, the order affects the handling of

struct Undeclared<int> final { };

Also, shouldn't we reject "override" on classes?

You can have stuff like
struct blah override{};

where struct blah is an elaborate-type-specifier, and override is a
variable name.
How do I tell the difference, or more precisely, how do I know when a
class is being defined for the first time?

Add the error after the call to cp_parser_commit_to_tentative_parse, at which point we've decided that we're dealing with a class definition.

Jason

Reply via email to