diff --git a/Changes b/Changes index 96b3cce30..c12fda030 100644 --- a/Changes +++ b/Changes @@ -9,6 +9,8 @@ indicates the contributor was also the author of the fix; Thanks! *** Support SV 2012 package import before port list. +**** Change SYMRSVDWORD to print as warning rather than error. + **** Fix shift corner-cases, bug765, bug766, bug768, bug772, bug776. [Clifford Wolf] **** Fix C compiler interpreting signing, bug773. [Clifford Wolf] diff --git a/bin/verilator b/bin/verilator index d61f1575d..27a324a75 100755 --- a/bin/verilator +++ b/bin/verilator @@ -3092,10 +3092,9 @@ simulators. =item SYMRSVDWORD -Error that a symbol matches a C++ reserved word and using this as a symbol -name would result in odd C compiler errors. You may disable this error -message as you would disable warnings, but the symbol will be renamed by -Verilator to avoid the conflict. +Warning that a symbol matches a C++ reserved word and using this as a symbol +name would result in odd C compiler errors. You may disable this warning, +but the symbol will be renamed by Verilator to avoid the conflict. =item SYNCASYNCNET diff --git a/src/V3Error.h b/src/V3Error.h index c4b2349d3..441a791e0 100644 --- a/src/V3Error.h +++ b/src/V3Error.h @@ -144,9 +144,10 @@ public: // Warnings we'll present to the user as errors // Later -Werror- options may make more of these. bool pretendError() const { return ( m_e==ASSIGNIN || m_e==BLKANDNBLK - || m_e==IMPURE || m_e==MODDUP || m_e==SYMRSVDWORD); } + || m_e==IMPURE || m_e==MODDUP); } // Warnings to mention manual - bool mentionManual() const { return ( m_e==EC_FATALSRC || pretendError() ); } + bool mentionManual() const { return ( m_e==EC_FATALSRC || m_e==SYMRSVDWORD + || pretendError() ); } // Warnings that are lint only bool lintError() const { return ( m_e==ALWCOMBORDER diff --git a/test_regress/t/t_var_rsvd_bad.pl b/test_regress/t/t_var_rsvd_bad.pl index 75cc085d9..0b3d587c6 100755 --- a/test_regress/t/t_var_rsvd_bad.pl +++ b/test_regress/t/t_var_rsvd_bad.pl @@ -12,8 +12,9 @@ top_filename("t/t_var_rsvd_port.v"); compile ( fails=>$Self->{v3}, expect=> -q{%Error-SYMRSVDWORD: t/t_var_rsvd_port.v:\d+: Symbol matches C\+\+ common word: 'bool' -%Error-SYMRSVDWORD: t/t_var_rsvd_port.v:\d+: Symbol matches C\+\+ reserved word: 'switch' +q{%Warning-SYMRSVDWORD: t/t_var_rsvd_port.v:\d+: Symbol matches C\+\+ common word: 'bool' +.* +%Warning-SYMRSVDWORD: t/t_var_rsvd_port.v:\d+: Symbol matches C\+\+ reserved word: 'switch' %Error: Exiting due to.*}, );