summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--translate.cxx4
2 files changed, 8 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index fe53eddf..a0fe764f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2005-11-28 Frank Ch. Eigler <fche@redhat.com>
+
+ * translate.cxx (c_tmpcounter_assignment::visit_symbol): Don't
+ emit unused temporary into context. Saves mucho space with strings.
+
2005-11-27 Roland McGrath <roland@redhat.com>
* loc2c.c (location_from_address): Diagnose null FB_ATTR specially.
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);