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:
parent
3fac72c729
commit
a62d375fda
@ -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,
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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.
|
||||
|
11
gcc/testsuite/g++.dg/parse/stmtexpr2.C
Normal file
11
gcc/testsuite/g++.dg/parse/stmtexpr2.C
Normal 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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user