This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[C++ Patch] PR 79361


Hi,

in this error recovery regression, we ICE after (a lot after) a sensible diagnostic, when lower_function_body encounters an error_mark_node. I worked quite a bit on the issue, and, all in all, I propose to simply check the return value of duplicate_decls as called by register_specialization and bail out.

In principle it may make sense to continue and, for example, also emit diagnostic about '= default' making sense only for special member functions - returning spec instead of error_mark_node would achieve that without regressions for the second testcase - but I'm not sure we want to do this kind of change right here right now together with fixing the ICE, because we do *not* emit additional diagnostic in the non-template case, eg for:

void foo(int) {}
void foo(int) = default;

Tested x86_64-linux.

Thanks, Paolo.

/////////////////////


Attachment: CL_79361
Description: Text document

Attachment: patch_79361
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]