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] Fix ICE on new with value dependent args (PR c++/34336)


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


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