case COMPOUND_EXPR:
case TRUTH_ANDIF_EXPR:
case TRUTH_ORIF_EXPR:
- tmp_before = tmp_nosp = tmp_list3 = 0;
+ tmp_before = tmp_nosp = tmp_list2 = tmp_list3 = 0;
verify_tree (TREE_OPERAND (x, 0), &tmp_before, &tmp_nosp, NULL_TREE);
warn_for_collisions (tmp_nosp);
merge_tlist (pbefore_sp, tmp_before, 0);
merge_tlist (pbefore_sp, tmp_nosp, 0);
- verify_tree (TREE_OPERAND (x, 1), &tmp_list3, pno_sp, NULL_TREE);
+ verify_tree (TREE_OPERAND (x, 1), &tmp_list3, &tmp_list2, NULL_TREE);
+ warn_for_collisions (tmp_list2);
merge_tlist (pbefore_sp, tmp_list3, 0);
+ merge_tlist (pno_sp, tmp_list2, 0);
return;
case COND_EXPR:
if (error_operand_p (lhs) || error_operand_p (rhs))
return error_mark_node;
- /* Handle control structure constructs used as "lvalues". */
+ /* Handle control structure constructs used as "lvalues". Note that we
+ leave COMPOUND_EXPR on the LHS because it is sequenced after the RHS. */
switch (TREE_CODE (lhs))
{
/* Handle --foo = 5; as these are valid constructs in C++. */
lhs = build2 (TREE_CODE (lhs), TREE_TYPE (lhs),
cp_stabilize_reference (TREE_OPERAND (lhs, 0)),
TREE_OPERAND (lhs, 1));
- newrhs = cp_build_modify_expr (loc, TREE_OPERAND (lhs, 0),
- modifycode, rhs, complain);
- if (newrhs == error_mark_node)
- return error_mark_node;
- return build2 (COMPOUND_EXPR, lhstype, lhs, newrhs);
-
- /* Handle (a, b) used as an "lvalue". */
- case COMPOUND_EXPR:
- newrhs = cp_build_modify_expr (loc, TREE_OPERAND (lhs, 1),
- modifycode, rhs, complain);
- if (newrhs == error_mark_node)
- return error_mark_node;
- return build2 (COMPOUND_EXPR, lhstype,
- TREE_OPERAND (lhs, 0), newrhs);
+ lhs = build2 (COMPOUND_EXPR, lhstype, lhs, TREE_OPERAND (lhs, 0));
+ break;
case MODIFY_EXPR:
if (TREE_SIDE_EFFECTS (TREE_OPERAND (lhs, 0)))
lhs = build2 (TREE_CODE (lhs), TREE_TYPE (lhs),
cp_stabilize_reference (TREE_OPERAND (lhs, 0)),
TREE_OPERAND (lhs, 1));
- newrhs = cp_build_modify_expr (loc, TREE_OPERAND (lhs, 0), modifycode,
- rhs, complain);
- if (newrhs == error_mark_node)
- return error_mark_node;
- return build2 (COMPOUND_EXPR, lhstype, lhs, newrhs);
+ lhs = build2 (COMPOUND_EXPR, lhstype, lhs, TREE_OPERAND (lhs, 0));
+ break;
case MIN_EXPR:
case MAX_EXPR: