Re: [PATCH] c++: ICE with attribute on enumerator [PR104667]

2022-02-28 Thread Jason Merrill via Gcc-patches
On 2/28/22 12:22, Marek Polacek wrote: On Mon, Feb 28, 2022 at 12:16:47PM -0400, Jason Merrill wrote: On 2/25/22 17:59, Marek Polacek wrote: When processing a template, the enumerators we build don't have a type yet. But is_late_template_attribute is not prepared to see a _DECL without a type,

Re: [PATCH] c++: ICE with attribute on enumerator [PR104667]

2022-02-28 Thread Marek Polacek via Gcc-patches
On Mon, Feb 28, 2022 at 12:16:47PM -0400, Jason Merrill wrote: > On 2/25/22 17:59, Marek Polacek wrote: > > When processing a template, the enumerators we build don't have a type > > yet. But is_late_template_attribute is not prepared to see a _DECL > > without a type, so we crash on > > > >e

Re: [PATCH] c++: ICE with attribute on enumerator [PR104667]

2022-02-28 Thread Jason Merrill via Gcc-patches
On 2/25/22 17:59, Marek Polacek wrote: When processing a template, the enumerators we build don't have a type yet. But is_late_template_attribute is not prepared to see a _DECL without a type, so we crash on enum tree_code code = TREE_CODE (type); (I found that we don't give the "is depreca