Chris> case BINOP_COMMA:
Chris> - evaluate_subexp (NULL_TYPE, exp, pos, noside);
Chris> - return evaluate_subexp (NULL_TYPE, exp, pos, noside);
Chris> + arg1 = evaluate_subexp (NULL_TYPE, exp, pos, noside);
Chris> + arg2 = evaluate_subexp (value_type (arg1), exp, pos, noside);
Chris> + if (noside == EVAL_SKIP)
Chris> + goto nosideret;
Chris> + if (current_language->la_language == language_cplus
Chris> + && binop_user_defined_p (op, arg1, arg2))
Chris> + {
Chris> + struct value *rc;
Chris> +
Chris> + rc = value_x_binop (arg1, arg2, op, OP_NULL, noside);
Chris> + if (rc != NULL)
Chris> + return rc;
Chris> + else
Chris> + return arg2;
I think I understand why the current_language check and the result check
of value_x_binop are needed.
However, I think it would be better to do all the work in value_x_binop
and also remove the current_language check. This is more similar to
what other code does and it consolidates the (broken) current_language
checks in the value code.
I'm guessing this means a change to value_user_defined_op.