Commit 40bec508 by Mark Mitchell Committed by Mark Mitchell

re PR c++/12515 (Use of ?: operator in templated class causes ICE)

	PR c++/12515
	* pt.c (build_non_dependent_expr): Handle GNU extension to ?:
	operator.

	PR c++/12515
	* g++.dg/ext/cond1.C: New test.

From-SVN: r73820
parent 0ba5c8a2
2003-11-21 Mark Mitchell <mark@codesourcery.com>
PR c++/12515
* pt.c (build_non_dependent_expr): Handle GNU extension to ?:
operator.
2003-11-21 Jan Hubicka <jh@suse.cz>
* parser.c (cp_parser_postfix_expression): Initialize 's' to
......
......@@ -11893,7 +11893,9 @@ build_non_dependent_expr (tree expr)
return build (COND_EXPR,
TREE_TYPE (expr),
TREE_OPERAND (expr, 0),
build_non_dependent_expr (TREE_OPERAND (expr, 1)),
(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)));
if (TREE_CODE (expr) == COMPOUND_EXPR
&& !COMPOUND_EXPR_OVERLOADED (expr))
......
2003-11-21 Mark Mitchell <mark@codesourcery.com>
PR c++/12515
* g++.dg/ext/cond1.C: New test.
2003-11-20 Richard Henderson <rth@redhat.com>
* gcc.dg/20020201-2.c: Remove.
......
// PR c++/12515
// { dg-do compile }
// { dg-options "" }
template<int> void foo() { 0 ?: 0; }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment