Commit cdb71673 by Nathan Sidwell Committed by Nathan Sidwell

* call.c (op_error): Make error messages clearer.

From-SVN: r37498
parent 4c8fb571
2000-11-16 Nathan Sidwell <nathan@codesourcery.com>
* call.c (op_error): Make error messages clearer.
2000-11-15 Mark Mitchell <mark@codesourcery.com> 2000-11-15 Mark Mitchell <mark@codesourcery.com>
* decl.c (wrapup_globals_for_namespace): Don't mark things * decl.c (wrapup_globals_for_namespace): Don't mark things
......
...@@ -2714,7 +2714,7 @@ op_error (code, code2, arg1, arg2, arg3, problem) ...@@ -2714,7 +2714,7 @@ op_error (code, code2, arg1, arg2, arg3, problem)
tree arg1, arg2, arg3; tree arg1, arg2, arg3;
const char *problem; const char *problem;
{ {
const char * opname; const char *opname;
if (code == MODIFY_EXPR) if (code == MODIFY_EXPR)
opname = assignment_operator_name_info[code2].name; opname = assignment_operator_name_info[code2].name;
...@@ -2724,23 +2724,23 @@ op_error (code, code2, arg1, arg2, arg3, problem) ...@@ -2724,23 +2724,23 @@ op_error (code, code2, arg1, arg2, arg3, problem)
switch (code) switch (code)
{ {
case COND_EXPR: 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)); error_type (arg1), error_type (arg2), error_type (arg3));
break; break;
case POSTINCREMENT_EXPR: case POSTINCREMENT_EXPR:
case POSTDECREMENT_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; break;
case ARRAY_REF: case ARRAY_REF:
cp_error ("%s for `%T[%T]'", problem, cp_error ("%s for `%T [%T]' operator", problem,
error_type (arg1), error_type (arg2)); error_type (arg1), error_type (arg2));
break; break;
default: default:
if (arg2) 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)); error_type (arg1), opname, error_type (arg2));
else else
cp_error ("%s for `%s%T'", problem, opname, error_type (arg1)); cp_error ("%s for `%s %T' operator", problem, opname, error_type (arg1));
} }
} }
......
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