From fc976bdb97d21787af4a269bdff29595ef62c300 Mon Sep 17 00:00:00 2001 From: "Frederick C. Kurz" Date: Fri, 10 Jul 2015 12:50:38 -0400 Subject: [PATCH] Changes for pform.cc First area of Change for "Microsoft Visual Studio Express 2015 RC Web" was for compiling with error when NDEBUG defined. The second and third areas of change for "Microsoft Visual Studio Express 2015 RC Web", the dynamic_cast has to come first so parpkg_test.v, parpkg_test1.v, parpkg_test2.v would pass. --- pform.cc | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/pform.cc b/pform.cc index 79d295c74..2b447820e 100644 --- a/pform.cc +++ b/pform.cc @@ -2677,7 +2677,10 @@ vector*pform_make_task_ports(const struct vlltype&loc, } curw->set_signed(signed_flag); - if (isint) assert(curw->set_wire_type(NetNet::INTEGER)); + if (isint) { + bool res = curw->set_wire_type(NetNet::INTEGER); + assert(res); + } /* If there is a range involved, it needs to be set. */ if (range) { @@ -2907,8 +2910,8 @@ void pform_set_parameter(const struct vlltype&loc, error_count += 1; } // Only a Module scope has specparams. - if ((scope == pform_cur_module.front()) && - (dynamic_cast (scope)) && + if ((dynamic_cast (scope)) && + (scope == pform_cur_module.front()) && (pform_cur_module.front()->specparams.find(name) != pform_cur_module.front()->specparams.end())) { LineInfo tloc; @@ -2941,8 +2944,8 @@ void pform_set_parameter(const struct vlltype&loc, parm.range = value_range; // Only a Module keeps the position of the parameter. - if ((scope == pform_cur_module.front()) && - (dynamic_cast (scope))) + if ((dynamic_cast (scope)) && + (scope == pform_cur_module.front())) pform_cur_module.front()->param_names.push_back(name); }