From 35e0a9873243f8f6590eba4ef49c60bba136a59e Mon Sep 17 00:00:00 2001 From: Stephen Williams Date: Tue, 18 Nov 2008 14:34:34 -0800 Subject: [PATCH] Improve error message about signal type conflict. When the parser detects a signal type conflict, print a more useful error message. In the process, be more careful with what line number is actually attributed to the declaration. --- pform.cc | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/pform.cc b/pform.cc index ef3ceacd4..a737a33b4 100644 --- a/pform.cc +++ b/pform.cc @@ -1447,11 +1447,11 @@ void pform_makewire(const vlltype&li, perm_string name, bool rc = cur->set_wire_type(type); if (rc == false) { ostringstream msg; - msg << name << " definition conflicts with " - << "definition at " << cur->get_fileline() + msg << name << " " << type + << " definition conflicts with " << cur->get_wire_type() + << " definition at " << cur->get_fileline() << "."; VLerror(msg.str().c_str()); - cerr << "XXXX type=" << type <<", curtype=" << cur->get_wire_type() << endl; } } @@ -1460,9 +1460,11 @@ void pform_makewire(const vlltype&li, perm_string name, if (! cur) { new_wire_flag = true; cur = new PWire(name, type, pt, dt); + FILE_NAME(cur, li.text, li.first_line); } - FILE_NAME(cur, li.text, li.first_line); + if (type != NetNet::IMPLICIT) + FILE_NAME(cur, li.text, li.first_line); bool flag; switch (dt) {