This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: C++ PATCH: PR 12515
On Fri, 2003-11-21 at 16:55, Richard Henderson wrote:
> On Fri, Nov 21, 2003 at 02:13:31PM -0800, Mark Mitchell wrote:
> > return build (COND_EXPR,
> > TREE_TYPE (expr),
> > TREE_OPERAND (expr, 0),
> > ! (TREE_OPERAND (expr, 1)
> > ! ? build_non_dependent_expr (TREE_OPERAND (expr, 1))
> > ! : build_non_dependent_expr (TREE_OPERAND (expr, 0))),
> > build_non_dependent_expr (TREE_OPERAND (expr, 2)));
>
> This looks like it would fail:
>
> int main()
> {
> int i = 0, j;
> j = ++i ? : 0;
> if (i != 1 || j != 1)
> abort ();
> }
This code only happens in templates and we don't use the resulting tree
structure to actually generate RTL. It's purely for type-checking
purposes.
--
Mark Mitchell <mark@codesourcery.com>
CodeSourcery, LLC