This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [C++ PATCH] Fix ICE on new with value dependent args (PR c++/34336)
- From: Mark Mitchell <mark at codesourcery dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: Jason Merrill <jason at redhat dot com>, gcc-patches at gcc dot gnu dot org
- Date: Wed, 05 Dec 2007 16:35:42 -0800
- Subject: Re: [C++ PATCH] Fix ICE on new with value dependent args (PR c++/34336)
- References: <20071205201208.GE25112@devserv.devel.redhat.com>
Jakub Jelinek wrote:
> Attached are 2 possible approaches, one modifies stabilize_call and
> stabilize_init to return immediately if processing_template_decl
> (similarly e.g. to how cp_save_expr returns immediately), the other
> modifies the caller (build_new_1) not to call these when
> processing_template_decl.
Let's have stabilize_* return immediately as in your patch. That patch
is OK if it passes testing. We want to let the code that runs when
processing non-dependent expressions be littered with as few
processing_template_decl conditionals as possible, so putting these
checks into the functions that are actually harmful, rather than into
the callers, make sense to me.
Thanks,
--
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713