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
This commit is contained in:
Gabriel Dos Reis 2003-06-21 16:43:44 +00:00 committed by Gabriel Dos Reis
parent 058de654c5
commit 84cc377e7f
2 changed files with 19 additions and 8 deletions

View File

@ -1,3 +1,10 @@
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>
PR c++/10915

View File

@ -3130,23 +3130,27 @@ op_error (enum tree_code code, enum tree_code code2,
switch (code)
{
case COND_EXPR:
error ("%s for `%T ? %T : %T' operator", problem,
error_type (arg1), error_type (arg2), error_type (arg3));
error ("%s for ternary 'operator?:' in '%E ? %E : %E'",
problem, arg1, arg2, arg3);
break;
case POSTINCREMENT_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;
case ARRAY_REF:
error ("%s for `%T [%T]' operator", problem,
error_type (arg1), error_type (arg2));
error ("%s for 'operator[]' in '%E[%E]'", problem, arg1, arg2);
break;
default:
if (arg2)
error ("%s for `%T %s %T' operator", problem,
error_type (arg1), opname, error_type (arg2));
error ("%s for 'operator%s' in '%E %s %E'",
problem, opname, arg1, opname, arg2);
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;
}
}