From 022b623fa22d305b1d294bf404ec88ca9112f210 Mon Sep 17 00:00:00 2001 From: dsmith Date: Mon, 26 Mar 2007 18:19:53 +0000 Subject: 2007-03-26 David Smith * tapsets.cxx (dwflpp::translate_final_fetch_or_store): Improved error messages for invalid types. * elaborate.cxx (typeresolution_info::invalid): Improved the error message for invalid operators. --- elaborate.cxx | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'elaborate.cxx') diff --git a/elaborate.cxx b/elaborate.cxx index 04eb1fa2..be0cfcec 100644 --- a/elaborate.cxx +++ b/elaborate.cxx @@ -2700,11 +2700,18 @@ typeresolution_info::invalid (const token* tok, exp_type pe) string nm = (current_function ? current_function->name : current_probe ? current_probe->name : "?"); - cerr << "semantic error: " + nm + " with invalid type " << pe << " for "; - if (tok) - cerr << *tok; + if (tok && tok->type == tok_operator) + { + cerr << "semantic error: " + nm + " uses invalid " << *tok; + } else - cerr << "a token"; + { + cerr << "semantic error: " + nm + " with invalid type " << pe << " for "; + if (tok) + cerr << *tok; + else + cerr << "a token"; + } cerr << endl; } } -- cgit