Re: C++ PATCH to fix a part of c++/70513 (ICE-on-invalid with enums)

2016-04-21 Thread Jason Merrill
OK. Jason

Re: C++ PATCH to fix a part of c++/70513 (ICE-on-invalid with enums)

2016-04-21 Thread Marek Polacek
On Thu, Apr 21, 2016 at 09:57:30AM -0400, Jason Merrill wrote: > On 04/21/2016 07:35 AM, Marek Polacek wrote: > >+ permerror (type_start_token->location, > >+ "extra qualification not allowed"); > >+ type = error_mark_node; > > If we're using permerror, we sho

Re: C++ PATCH to fix a part of c++/70513 (ICE-on-invalid with enums)

2016-04-21 Thread Jason Merrill
On 04/21/2016 07:35 AM, Marek Polacek wrote: + permerror (type_start_token->location, +"extra qualification not allowed"); + type = error_mark_node; If we're using permerror, we shouldn't set type to error_mark_node; if we do that, -fpermissive w

Re: C++ PATCH to fix a part of c++/70513 (ICE-on-invalid with enums)

2016-04-21 Thread Marek Polacek
On Wed, Apr 20, 2016 at 11:33:55AM -0400, Jason Merrill wrote: > On 04/08/2016 07:51 AM, Marek Polacek wrote: > >By the template part of this PR I mean that we ICE on > > > >template > >class D > >{ > > enum D::A { foo } c; > >}; > > > >where clang++ says > >error: template specialization or def

Re: C++ PATCH to fix a part of c++/70513 (ICE-on-invalid with enums)

2016-04-20 Thread Jason Merrill
On 04/08/2016 07:51 AM, Marek Polacek wrote: This is my attempt to fix at least a part of this PR. I haven't been able to come up with a fix that fixes the other part involving templates. We were ICEing on code such as struct S { enum E : int; enum S::E : int { foo } e; }; Clang rejects

Re: C++ PATCH to fix a part of c++/70513 (ICE-on-invalid with enums)

2016-04-20 Thread Marek Polacek
Ping. On Fri, Apr 08, 2016 at 01:51:02PM +0200, Marek Polacek wrote: > This is my attempt to fix at least a part of this PR. I haven't been able to > come up with a fix that fixes the other part involving templates. > > We were ICEing on code such as > > struct S > { > enum E : int; > enum

C++ PATCH to fix a part of c++/70513 (ICE-on-invalid with enums)

2016-04-08 Thread Marek Polacek
This is my attempt to fix at least a part of this PR. I haven't been able to come up with a fix that fixes the other part involving templates. We were ICEing on code such as struct S { enum E : int; enum S::E : int { foo } e; }; Clang rejects this with "extra qualification" error. When I m