Commit 84cc377e by Gabriel Dos Reis Committed by Gabriel Dos Reis

PC c++/10864

	PC c++/10864
	* call.c (op_error): Tidy.
	* error.c (dump_expr): Properly format 'T()' when T is an
	aggregate type.

From-SVN: r68309
parent 058de654
2003-06-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
PC c++/10864
* call.c (op_error): Tidy.
* error.c (dump_expr): Properly format 'T()' when T is an
aggregate type.
2003-06-21 Gabriel Dos Reis <gdr@integrable-solutions.net> 2003-06-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
PR c++/10915 PR c++/10915
......
...@@ -3130,23 +3130,27 @@ op_error (enum tree_code code, enum tree_code code2, ...@@ -3130,23 +3130,27 @@ op_error (enum tree_code code, enum tree_code code2,
switch (code) switch (code)
{ {
case COND_EXPR: case COND_EXPR:
error ("%s for `%T ? %T : %T' operator", problem, error ("%s for ternary 'operator?:' in '%E ? %E : %E'",
error_type (arg1), error_type (arg2), error_type (arg3)); problem, arg1, arg2, arg3);
break; break;
case POSTINCREMENT_EXPR: case POSTINCREMENT_EXPR:
case POSTDECREMENT_EXPR: case POSTDECREMENT_EXPR:
error ("%s for `%T %s' operator", problem, error_type (arg1), opname); error ("%s for 'operator%s' in '%E%s'", problem, opname, arg1, opname);
break; break;
case ARRAY_REF: case ARRAY_REF:
error ("%s for `%T [%T]' operator", problem, error ("%s for 'operator[]' in '%E[%E]'", problem, arg1, arg2);
error_type (arg1), error_type (arg2));
break; break;
default: default:
if (arg2) if (arg2)
error ("%s for `%T %s %T' operator", problem, error ("%s for 'operator%s' in '%E %s %E'",
error_type (arg1), opname, error_type (arg2)); problem, opname, arg1, opname, arg2);
else else
error ("%s for `%s %T' operator", problem, opname, error_type (arg1)); error ("%s for 'operator%s' in '%s%E'",
problem, opname, opname, arg1);
break;
} }
} }
......
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