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 58503


Hi,

in this error recovery issue in template context, do_range_for_auto_deduction calls cp_parser_perform_range_for_lookup, which can't resolve begin/end and eventually crashes because TREE_TYPE (*begin) and TREE_TYPE (*end) are NULL_TREE.

It doesn't seem correct to simply early return error_mark_node, because the errors at issue are the permerror(s) produced by unqualified_fn_lookup_error. However, returning NULL_TREE, while adjusting do_range_for_auto_deduction to do nothing when the return type of begin/end isn't known, like in the case at issue, appears to work fine (I also checked that with -fpermissive an eventual instantiation produces hard errors, as it should)

Tested x86_64-linux.

Thanks,
Paolo.

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


Attachment: CL_58503
Description: Text document

Attachment: patch_58503
Description: Text document


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