diff options
author | Nathan Sidwell <nathan@codesourcery.com> | 2000-11-16 11:49:44 +0000 |
---|---|---|
committer | Nathan Sidwell <nathan@gcc.gnu.org> | 2000-11-16 11:49:44 +0000 |
commit | cdb7167327858bd38a88f22e5f986197ed0f2343 (patch) | |
tree | 277fa08c60ba6883c418e3ec9ecbf45288f0250d /gcc/cp | |
parent | 4c8fb5714bd5ab8c6df3e1c122b25cb45a113826 (diff) | |
download | gcc-cdb7167327858bd38a88f22e5f986197ed0f2343.zip gcc-cdb7167327858bd38a88f22e5f986197ed0f2343.tar.gz gcc-cdb7167327858bd38a88f22e5f986197ed0f2343.tar.bz2 |
* call.c (op_error): Make error messages clearer.
From-SVN: r37498
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/cp/call.c | 12 |
2 files changed, 10 insertions, 6 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 5294676..73ad45e 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,7 @@ +2000-11-16 Nathan Sidwell <nathan@codesourcery.com> + + * call.c (op_error): Make error messages clearer. + 2000-11-15 Mark Mitchell <mark@codesourcery.com> * decl.c (wrapup_globals_for_namespace): Don't mark things diff --git a/gcc/cp/call.c b/gcc/cp/call.c index 4d2e7a1..447835f 100644 --- a/gcc/cp/call.c +++ b/gcc/cp/call.c @@ -2714,7 +2714,7 @@ op_error (code, code2, arg1, arg2, arg3, problem) tree arg1, arg2, arg3; const char *problem; { - const char * opname; + const char *opname; if (code == MODIFY_EXPR) opname = assignment_operator_name_info[code2].name; @@ -2724,23 +2724,23 @@ op_error (code, code2, arg1, arg2, arg3, problem) switch (code) { case COND_EXPR: - cp_error ("%s for `%T ? %T : %T'", problem, + cp_error ("%s for `%T ? %T : %T' operator", problem, error_type (arg1), error_type (arg2), error_type (arg3)); break; case POSTINCREMENT_EXPR: case POSTDECREMENT_EXPR: - cp_error ("%s for `%T%s'", problem, error_type (arg1), opname); + cp_error ("%s for `%T %s' operator", problem, error_type (arg1), opname); break; case ARRAY_REF: - cp_error ("%s for `%T[%T]'", problem, + cp_error ("%s for `%T [%T]' operator", problem, error_type (arg1), error_type (arg2)); break; default: if (arg2) - cp_error ("%s for `%T %s %T'", problem, + cp_error ("%s for `%T %s %T' operator", problem, error_type (arg1), opname, error_type (arg2)); else - cp_error ("%s for `%s%T'", problem, opname, error_type (arg1)); + cp_error ("%s for `%s %T' operator", problem, opname, error_type (arg1)); } } |