Re: [PATCH] attribs: Don't diagnose attribute exclusions during error recovery [PR94705]

2020-04-22 Thread Richard Biener
On Wed, 22 Apr 2020, Jakub Jelinek wrote: > Hi! > > On the following testcase GCC ICEs, because last_decl is error_mark_node, > and diag_attr_exclusions assumes that if it is not NULL, it must be a decl. > > The following patch just doesn't diagnose attribute exclusions if the > other decl is er

[PATCH] attribs: Don't diagnose attribute exclusions during error recovery [PR94705]

2020-04-22 Thread Jakub Jelinek via Gcc-patches
Hi! On the following testcase GCC ICEs, because last_decl is error_mark_node, and diag_attr_exclusions assumes that if it is not NULL, it must be a decl. The following patch just doesn't diagnose attribute exclusions if the other decl is erroneous (and thus we've already reported errors for it).