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]

Re: [C++ Patch] ("[7/8 Regression] ICE with failed class template argument deduction because of invalid template parameter")


OK.

On Tue, Apr 3, 2018 at 5:02 AM, Paolo Carlini <paolo.carlini@oracle.com> wrote:
> Hi,
>
> the reason why we ICE here is very simple: we pass an error_mark_node
> generated in cp_parser_template_parameter_list to rewrite_template_parm
> which ICEs (via get_template_parm_index). I believe it makes sense to
> robustify the latter like all the other functions involved in
> build_deduction_guide. The next, error recovery quality, issue is whether or
> not we still want to produce diagnostic about class template argument
> deduction failing: today I noticed - somewhat surprisingly - that some
> compilers still do that (however the diagnostic is more terse: eg, one
> additional error and two notes, not two errors and five notes!). I had
> tested the below which suppresses those additional errors by returning
> error_mark_node from build_deduction_guide if one of those parsing-time
> error_mark_nodes is encountered in the build_deduction_guide loop - and lays
> out a bit of infrastructure.
>
> Tested x86_64-linux.
>
> Thanks, Paolo.
>
> ////////////////
>


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