summaryrefslogtreecommitdiffstats
path: root/translate.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'translate.cxx')
-rw-r--r--translate.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/translate.cxx b/translate.cxx
index 1782abd1..58fa9182 100644
--- a/translate.cxx
+++ b/translate.cxx
@@ -2738,6 +2738,10 @@ c_unparser::visit_return_statement (return_statement* s)
"vs", s->tok);
c_assign ("l->__retvalue", s->value, "return value");
+
+ // make sure we reports errors from computing s->value
+ visit_statement (s, 0, false);
+
o->newline() << "c->last_error = \"\";";
// NB: last_error needs to get reset to NULL in the caller
// probe/function