summaryrefslogtreecommitdiffstats
path: root/parse.cxx
diff options
context:
space:
mode:
authorfche <fche>2005-03-03 21:24:24 +0000
committerfche <fche>2005-03-03 21:24:24 +0000
commit0054a7eaacba2a7183be67b28e7746ed55a8f6d1 (patch)
treeed5c0db8a2cd3bb85fd9bd24232fe01ef6576a68 /parse.cxx
parent56099f083d7a68722ace316be4d288d21caabaee (diff)
downloadsystemtap-steved-0054a7eaacba2a7183be67b28e7746ed55a8f6d1.tar.gz
systemtap-steved-0054a7eaacba2a7183be67b28e7746ed55a8f6d1.tar.xz
systemtap-steved-0054a7eaacba2a7183be67b28e7746ed55a8f6d1.zip
2005-03-03 Frank Ch. Eigler <fche@redhat.com>
* parse.cxx (parse_assignment): Assert lvalueness of left operand. * staptree.h (expression): Add is_lvalue member. * staptree.cxx (functioncall::resolve_types): Don't crash on formal-vs-actual argument count mismatch. (*): Add some is_lvalue stub functions. * testsuite/*: Some new tests.
Diffstat (limited to 'parse.cxx')
-rw-r--r--parse.cxx2
1 files changed, 2 insertions, 0 deletions
diff --git a/parse.cxx b/parse.cxx
index 4238f37e..41ec6fef 100644
--- a/parse.cxx
+++ b/parse.cxx
@@ -648,6 +648,8 @@ parser::parse_assignment ()
t->content == "+=" ||
false)) // XXX: add /= etc.
{
+ if (op1->is_lvalue () == 0)
+ throw parse_error ("assignment not to lvalue");
assignment* e = new assignment;
e->left = op1;
e->op = t->content;