cvt.c (convert_to_void): Don't unconditionally make COND_EXPRs void.

* cvt.c (convert_to_void): Don't unconditionally make COND_EXPRs
	void.

From-SVN: r52742
This commit is contained in:
Mark Mitchell 2002-04-24 22:46:40 +00:00 committed by Mark Mitchell
parent 3fac72c729
commit a62d375fda
4 changed files with 23 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2002-04-24 Mark Mitchell <mark@codesourcery.com>
PR c++/6438.
* cvt.c (convert_to_void): Don't unconditionally make COND_EXPRs
void.
2002-04-24 Neil Booth <neil@daikokuya.demon.co.uk>
* cp-lang.c (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE,

View File

@ -836,7 +836,7 @@ convert_to_void (expr, implicit)
tree new_op1 = convert_to_void (op1, implicit);
tree new_op2 = convert_to_void (op2, implicit);
expr = build (COND_EXPR, void_type_node,
expr = build (COND_EXPR, TREE_TYPE (new_op1),
TREE_OPERAND (expr, 0), new_op1, new_op2);
break;
}

View File

@ -1,3 +1,8 @@
2002-04-24 Mark Mitchell <mark@codesourcery.com>
PR c++/6438.
* g++.dg/parse/stmtexpr2.C: New test.
Wed Apr 24 21:38:36 2002 J"orn Rennecke <joern.rennecke@superh.com>
* gcc.dg/20020312-2.c: Add SH target.

View File

@ -0,0 +1,11 @@
// { dg-do compile }
// { dg-options "" }
#define DMAX(a,b) ({double _a = (a), _b = (b); _a > _b ? _a : _b; })
void foo(void)
{
double xl, dy;
xl = DMAX(dy, 0.0);
}