mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-03-13 01:56:56 +08:00
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:
parent
058de654c5
commit
84cc377e7f
@ -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
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user