Re: [PATCH] c++: Fix up push_local_extern_decl_alias error recovery [PR102642]

2021-10-19 Thread Jason Merrill via Gcc-patches
On 10/19/21 11:21, Jakub Jelinek wrote: On Tue, Oct 19, 2021 at 10:48:04AM -0400, Jason Merrill wrote: What if we use NULL_TREE for the error case instead of error_mark_node, i.e. - DECL_LOCAL_DECL_ALIAS (decl) = alias; + if (alias != error_mark_node) +DECL_LOCAL_DECL_ALIAS (decl) = alias

Re: [PATCH] c++: Fix up push_local_extern_decl_alias error recovery [PR102642]

2021-10-19 Thread Jakub Jelinek via Gcc-patches
On Tue, Oct 19, 2021 at 10:48:04AM -0400, Jason Merrill wrote: > What if we use NULL_TREE for the error case instead of error_mark_node, i.e. > > - DECL_LOCAL_DECL_ALIAS (decl) = alias; > + if (alias != error_mark_node) > +DECL_LOCAL_DECL_ALIAS (decl) = alias; > > ? That ought to avoid the

Re: [PATCH] c++: Fix up push_local_extern_decl_alias error recovery [PR102642]

2021-10-19 Thread Jason Merrill via Gcc-patches
On 10/11/21 07:18, Jakub Jelinek wrote: Hi! My recent push_local_extern_decl_alias change broke error-recovery, do_pushdecl can return error_mark_node and set_decl_tls_model can't be called on that. There are other code paths that store error_mark_node into DECL_LOCAL_DECL_ALIAS, with the inten

[PATCH] c++: Fix up push_local_extern_decl_alias error recovery [PR102642]

2021-10-11 Thread Jakub Jelinek via Gcc-patches
Hi! My recent push_local_extern_decl_alias change broke error-recovery, do_pushdecl can return error_mark_node and set_decl_tls_model can't be called on that. There are other code paths that store error_mark_node into DECL_LOCAL_DECL_ALIAS, with the intent to differentiate the cases where we have