[PATCH] Fix PR23794, wrong types from the C++ frontend for COND_EXPRs

Mark Mitchell mark@codesourcery.com
Thu Aug 17 00:50:00 GMT 2006

Richard Guenther wrote:

> 2005-08-30  Richard Guenther  <rguenther@suse.de>
> 	PR c++/23794
> 	* pt.c (build_non_dependent_expr): Apply implicit conversion
> 	to conditional of COND_EXPR.

This should not be necessary.  Expressions in templates *must* be
allowed to circumvent the type-consistency rules in some cases, so all
this does is waste memory.  However, the front-end should never call
fold directly when it might be processing a template; instead it should
call fold_if_not_in_template.

The PR says that build_array_ref calls fold (which would be wrong), but
it looks like it now calls fold_if_not_in_template.

So, I think this patch is unnecessary, and that this PR should be closed.

Mark Mitchell
(650) 331-3385 x713

More information about the Gcc-patches mailing list