From 84cc377e7fada373402dc72c1bc2c7fea4b544f2 Mon Sep 17 00:00:00 2001 From: Gabriel Dos Reis Date: Sat, 21 Jun 2003 16:43:44 +0000 Subject: [PATCH] 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 --- gcc/cp/ChangeLog | 7 +++++++ gcc/cp/call.c | 20 ++++++++++++-------- 2 files changed, 19 insertions(+), 8 deletions(-) diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 7f0c4ede4c0..0e679c9268b 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,10 @@ +2003-06-21 Gabriel Dos Reis + + 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 PR c++/10915 diff --git a/gcc/cp/call.c b/gcc/cp/call.c index 9bc55bef9e2..48e36421223 100644 --- a/gcc/cp/call.c +++ b/gcc/cp/call.c @@ -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; } } -- 2.30.2