[C++ PATCH] Fix ICE on new with value dependent args (PR c++/34336)

Mark Mitchell mark@codesourcery.com
Thu Dec 6 00:36:00 GMT 2007


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



More information about the Gcc-patches mailing list