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.
This commit is contained in:
Frederick C. Kurz 2015-07-10 12:50:38 -04:00 committed by Stephen Williams
parent 9f7995f648
commit fc976bdb97
1 changed files with 8 additions and 5 deletions

View File

@ -2677,7 +2677,10 @@ vector<pform_tf_port_t>*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<Module*> (scope)) &&
if ((dynamic_cast<Module*> (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<Module*> (scope)))
if ((dynamic_cast<Module*> (scope)) &&
(scope == pform_cur_module.front()))
pform_cur_module.front()->param_names.push_back(name);
}