summaryrefslogtreecommitdiffstats
path: root/elaborate.cxx
diff options
context:
space:
mode:
authordsmith <dsmith>2007-03-26 18:19:53 +0000
committerdsmith <dsmith>2007-03-26 18:19:53 +0000
commit022b623fa22d305b1d294bf404ec88ca9112f210 (patch)
tree34ea01a0006e4fe38beb00141f9157ac59eb32b4 /elaborate.cxx
parent5d65678dde08d0b2e34ee79c2e0f6c26ff3e4592 (diff)
downloadsystemtap-steved-022b623fa22d305b1d294bf404ec88ca9112f210.tar.gz
systemtap-steved-022b623fa22d305b1d294bf404ec88ca9112f210.tar.xz
systemtap-steved-022b623fa22d305b1d294bf404ec88ca9112f210.zip
2007-03-26 David Smith <dsmith@redhat.com>
* 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.
Diffstat (limited to 'elaborate.cxx')
-rw-r--r--elaborate.cxx15
1 files changed, 11 insertions, 4 deletions
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;
}
}