summaryrefslogtreecommitdiffstats
path: root/translate.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'translate.cxx')
-rw-r--r--translate.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/translate.cxx b/translate.cxx
index e47f2856..2035477e 100644
--- a/translate.cxx
+++ b/translate.cxx
@@ -2383,7 +2383,9 @@ c_tmpcounter_assignment::visit_symbol (symbol *e)
tmpvar res = parent->parent->gensym (ty);
tmp.declare (*(parent->parent));
- res.declare (*(parent->parent));
+
+ if (op != "=") // simple assignment is shortcut both for strings and numbers
+ res.declare (*(parent->parent));
if (rvalue)
rvalue->visit (parent);