Change MODDUP errors to warnings, msg2588.

This commit is contained in:
Wilson Snyder 2018-07-23 18:57:34 -04:00
parent 8e646bc55f
commit d90064eaee
4 changed files with 12 additions and 6 deletions

View File

@ -12,6 +12,8 @@ The contributors that suggested a given feature are shown in []. Thanks!
**** Fix std:: build error, bug1322.
**** Change MODDUP errors to warnings, msg2588. [Marshal Qiao]
* Verilator 3.924 2018-06-12

View File

@ -3361,10 +3361,14 @@ correctly.
=item MODDUP
Error that a module has multiple definitions. Generally this indicates a
Warns that a module has multiple definitions. Generally this indicates a
coding error, or a mistake in a library file and it's good practice to have
one module per file to avoid these issues. For some gate level netlists
duplicates are unavoidable, and this error may be disabled.
one module per file (and only put each file once on the command line) to
avoid these issues. For some gate level netlists duplicates are sometimes
unavoidable, and MODDUP should be disabled.
Ignoring this warning will cause the more recent module definition to be
discarded.
=item MULTIDRIVEN

View File

@ -154,7 +154,7 @@ public:
// Later -Werror- options may make more of these.
bool pretendError() const { return ( m_e==ASSIGNIN || m_e==BLKANDNBLK
|| m_e==BLKLOOPINIT
|| m_e==IMPURE || m_e==MODDUP); }
|| m_e==IMPURE); }
// Warnings to mention manual
bool mentionManual() const { return ( m_e==EC_FATALSRC || m_e==SYMRSVDWORD
|| pretendError() ); }

View File

@ -12,8 +12,8 @@ scenarios(vlt_all => 1);
compile(
fails => 1,
expect =>
'%Error-MODDUP: t/t_mod_dup_bad.v:\d+: Duplicate declaration of module: a
%Error-MODDUP: t/t_mod_dup_bad.v:\d+: ... Location of original declaration
'%Warning-MODDUP: t/t_mod_dup_bad.v:\d+: Duplicate declaration of module: a
%Warning-MODDUP: t/t_mod_dup_bad.v:\d+: ... Location of original declaration
.*
%Error: Exiting due to.*',
);