This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, RFA, C++] ICE on ill-formed template_fun(&mem_fun) within template function
- From: Mark Mitchell <mark at codesourcery dot com>
- To: Alexandre Oliva <aoliva at redhat dot com>
- Cc: Jason Merrill <jason at redhat dot com>, nathan at codesourcery dot com, gcc-patches at gcc dot gnu dot org
- Date: Mon, 20 Feb 2006 15:22:23 -0800
- Subject: Re: [PATCH, RFA, C++] ICE on ill-formed template_fun(&mem_fun) within template function
- References: <orslvtiuwu.fsf@livre.oliva.athome.lsd.ic.unicamp.br> <orfyqnt0yg.fsf@livre.oliva.athome.lsd.ic.unicamp.br> <4390C46B.5090805@redhat.com> <or64oma6zx.fsf@livre.oliva.athome.lsd.ic.unicamp.br> <orzmkl980p.fsf@free.oliva.athome.lsd.ic.unicamp.br>
Alexandre Oliva wrote:
> for gcc/cp/ChangeLog
> from Alexandre Oliva <aoliva@redhat.com>
>
> * class.c (instantiate_type): Handle NON_DEPENDENT_EXPR.
> * pt.c (resolve_overloaded_unification): Likewise.
> (build_non_dependent_expr): Remove incorrect assertion.
> * semantics.c (finish_non_static_data_member): Don't mark
> current_class_ptr as used if it's NULL.
>
> for gcc/testsuite/ChangeLog
> from Alexandre Oliva <aoliva@redhat.com>
>
> * g++.dg/template/dependent-expr5.C: New test.
This needs a lot more explanation. It looks like you may be fixing
several things; in that case, let's explain each thing separately. For
starters, why is the assertion in pt.c incorrect? What's the input that
gets us there? The semantics.c change looks like it might be
independent of the other bits? Do we really need to pass
NON_DEPENDENT_EXPRs down into instantiate_type? That's very scary, and
if the only reason is to get an error message, I'd hope we could do it
sooner.
Thanks,
--
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713