From c01d3d3d0881a9d639f68bc54c82a5829c179d60 Mon Sep 17 00:00:00 2001 From: fche Date: Wed, 18 Jan 2006 05:12:49 +0000 Subject: 2006-01-18 Frank Ch. Eigler * translate.cxx (c_unparser_assignment::visit_arrayindex): Eliminate dummy assignments for "<<<" code. --- ChangeLog | 5 +++++ translate.cxx | 9 +++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 824d798f..b6d84edb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2006-01-18 Frank Ch. Eigler + + * translate.cxx (c_unparser_assignment::visit_arrayindex): + Eliminate dummy assignments for "<<<" code. + 2006-01-17 Josh Stone PR 2156 diff --git a/translate.cxx b/translate.cxx index ba383682..4fb608db 100644 --- a/translate.cxx +++ b/translate.cxx @@ -3156,7 +3156,7 @@ c_unparser_assignment::visit_arrayindex (arrayindex *e) // There is an exception to the above form: if we're doign a <<< assigment to // a statistic-valued map, there's a special form we follow: // - // ({ tmp0=(idx0); ... tmpN=(idxN); rvar=(rhs); lvar; res; + // ({ tmp0=(idx0); ... tmpN=(idxN); rvar=(rhs); // *no need to* lock (array); // _stp_map_add_stat (array, idx0...N, rvar); // *no need to* unlock (array); @@ -3177,9 +3177,10 @@ c_unparser_assignment::visit_arrayindex (arrayindex *e) o->newline() << "c->last_stmt = " << lex_cast_qstring(*e->tok) << ";"; // NB: *no need to* varlock_w guard (*parent, mvar); o->newline() << mvar.add (idx, rvar) << ";"; - // dummy assignments - o->newline() << lvar << " = " << rvar << ";"; - o->newline() << res << " = " << rvar << ";"; + res = rvar; + // no need for these dummy assignments + // o->newline() << lvar << " = " << rvar << ";"; + // o->newline() << res << " = " << rvar << ";"; } else { // block used to control varlock_w lifespan -- cgit