From 6cc244766cd2428ba171861e4c358613f64932f9 Mon Sep 17 00:00:00 2001 From: Stephen Williams Date: Wed, 7 May 2008 07:31:01 -0700 Subject: [PATCH] Fix build error branching around initializations. --- elab_net.cc | 38 ++++++++++++++++++++------------------ 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/elab_net.cc b/elab_net.cc index 1f0abdfba..fa57850db 100644 --- a/elab_net.cc +++ b/elab_net.cc @@ -3227,15 +3227,16 @@ NetNet* PEUnary::elaborate_net(Design*des, NetScope*scope, sig->data_type(sub_sig->data_type()); sig->local_flag(true); - NetAbs*tmp = new NetAbs(scope, scope->local_symbol(), sub_sig->vector_width()); - tmp->set_line(*this); - des->add_node(tmp); - tmp->rise_time(rise); - tmp->fall_time(fall); - tmp->decay_time(decay); + { NetAbs*tmp = new NetAbs(scope, scope->local_symbol(), sub_sig->vector_width()); + tmp->set_line(*this); + des->add_node(tmp); + tmp->rise_time(rise); + tmp->fall_time(fall); + tmp->decay_time(decay); - connect(tmp->pin(1), sub_sig->pin(0)); - connect(tmp->pin(0), sig->pin(0)); + connect(tmp->pin(1), sub_sig->pin(0)); + connect(tmp->pin(0), sig->pin(0)); + } break; case 'N': // Reduction NOR @@ -3491,17 +3492,18 @@ NetNet* PEUnary::elab_net_unary_real_(Design*des, NetScope*scope, des->errors += 1; break; - case 'm': // abs() - NetAbs*tmp = new NetAbs(scope, scope->local_symbol(), 1); - tmp->set_line(*this); - tmp->rise_time(rise); - tmp->fall_time(fall); - tmp->decay_time(decay); - des->add_node(tmp); + case 'm': { // abs() + NetAbs*tmp = new NetAbs(scope, scope->local_symbol(), 1); + tmp->set_line(*this); + tmp->rise_time(rise); + tmp->fall_time(fall); + tmp->decay_time(decay); + des->add_node(tmp); - connect(tmp->pin(0), sig->pin(0)); - connect(tmp->pin(1), sub_sig->pin(0)); - break; + connect(tmp->pin(0), sig->pin(0)); + connect(tmp->pin(1), sub_sig->pin(0)); + break; + } case '-': NetAddSub*sub = new NetAddSub(scope, scope->local_symbol(), 1);