Change ENDLABEL from warning into an error.

This commit is contained in:
Wilson Snyder 2022-11-12 12:09:37 -05:00
parent dbcaad99c5
commit 0a045a7bf6
5 changed files with 16 additions and 16 deletions

View File

@ -17,6 +17,7 @@ Verilator 5.003 devel
* Support named properties (#3667). [Ryszard Rozak, Antmicro Ltd]
* Support randcase.
* Internal AST improvements, also affect XML format (#3721). [Geza Lore]
* Change ENDLABEL from warning into an error.
* Fix return type of $countbits functions to int (#3725). [Ryszard Rozak, Antmicro Ltd]
* Fix missing UNUSED warnings with --coverage (#3736). [alejandro-castro-ortegon]
* Fix tracing parameters overridden with -G (#3723). [Iztok Jeras]

View File

@ -1490,7 +1490,7 @@ Summary:
Disable all lint related warning messages, and all style warnings. This is
equivalent to ``-Wno-ALWCOMBORDER -Wno-BSSPACE -Wno-CASEINCOMPLETE
-Wno-CASEOVERLAP -Wno-CASEX -Wno-CASTCONST -Wno-CASEWITHX -Wno-CMPCONST -Wno-COLONPLUS
-Wno-ENDLABEL -Wno-IMPLICIT -Wno-LITENDIAN -Wno-PINCONNECTEMPTY
-Wno-IMPLICIT -Wno-LITENDIAN -Wno-PINCONNECTEMPTY
-Wno-PINMISSING -Wno-SYNCASYNCNET -Wno-UNDRIVEN -Wno-UNSIGNED
-Wno-UNUSEDGENVAR -Wno-UNUSEDPARAM -Wno-UNUSEDSIGNAL
-Wno-WIDTH`` plus the list shown for Wno-style.
@ -1526,7 +1526,7 @@ Summary:
enabled), but do not affect style messages. This is equivalent to
``-Wwarn-ALWCOMBORDER -Wwarn-BSSPACE -Wwarn-CASEINCOMPLETE
-Wwarn-CASEOVERLAP -Wwarn-CASEX -Wwarn-CASTCONST -Wwarn-CASEWITHX -Wwarn-CMPCONST
-Wwarn-COLONPLUS -Wwarn-ENDLABEL -Wwarn-IMPLICIT -Wwarn-LITENDIAN
-Wwarn-COLONPLUS -Wwarn-IMPLICIT -Wwarn-LITENDIAN
-Wwarn-PINMISSING -Wwarn-REALCVT -Wwarn-UNSIGNED -Wwarn-WIDTH``.
.. option:: -Wwarn-style

View File

@ -537,11 +537,11 @@ List Of Warnings
.. option:: ENDLABEL
Warns that a label attached to a "end"-something statement does not
Error that a label attached to a "end"-something statement does not
match the label attached to the block start.
Ignoring this warning will only suppress the lint check, it will
simulate correctly.
This error is required by IEEE. Ignoring this warning will only suppress
the lint check, it will simulate correctly.
Faulty example:
@ -556,7 +556,7 @@ List Of Warnings
.. code-block::
%Warning-ENDLABEL: example.v:2:13: End label 'not_mine' does not match begin label 'mine'
%Error-ENDLABEL: example.v:2:13: End label 'not_mine' does not match begin label 'mine'
To repair either fix the end label's name, or remove entirely.

View File

@ -206,8 +206,8 @@ public:
// Later -Werror- options may make more of these.
bool pretendError() const VL_MT_SAFE {
return (m_e == ASSIGNIN || m_e == BADSTDPRAGMA || m_e == BLKANDNBLK || m_e == BLKLOOPINIT
|| m_e == CONTASSREG || m_e == IMPURE || m_e == PINNOTFOUND || m_e == PKGNODECL
|| m_e == PROCASSWIRE // Says IEEE
|| m_e == CONTASSREG || m_e == ENDLABEL || m_e == IMPURE || m_e == PINNOTFOUND
|| m_e == PKGNODECL || m_e == PROCASSWIRE // Says IEEE
|| m_e == ZERODLY);
}
// Warnings to mention manual
@ -218,7 +218,7 @@ public:
bool lintError() const VL_MT_SAFE {
return (m_e == ALWCOMBORDER || m_e == BSSPACE || m_e == CASEINCOMPLETE
|| m_e == CASEOVERLAP || m_e == CASEWITHX || m_e == CASEX || m_e == CASTCONST
|| m_e == CMPCONST || m_e == COLONPLUS || m_e == ENDLABEL || m_e == IMPLICIT
|| m_e == CMPCONST || m_e == COLONPLUS || m_e == IMPLICIT
|| m_e == LATCH || m_e == LITENDIAN || m_e == PINMISSING || m_e == REALCVT
|| m_e == UNSIGNED || m_e == WIDTH);
}

View File

@ -1,18 +1,17 @@
%Warning-ENDLABEL: t/t_hierarchy_identifier_bad.v:34:10: End label 'if_cnt_finish_bad' does not match begin label 'if_cnt_finish'
%Error-ENDLABEL: t/t_hierarchy_identifier_bad.v:34:10: End label 'if_cnt_finish_bad' does not match begin label 'if_cnt_finish'
34 | end : if_cnt_finish_bad
| ^~~~~~~~~~~~~~~~~
... For warning description see https://verilator.org/warn/ENDLABEL?v=latest
... Use "/* verilator lint_off ENDLABEL */" and lint_on around source to disable this message.
%Warning-ENDLABEL: t/t_hierarchy_identifier_bad.v:40:10: End label 'generate_for_bad' does not match begin label 'generate_for'
... For error description see https://verilator.org/warn/ENDLABEL?v=latest
%Error-ENDLABEL: t/t_hierarchy_identifier_bad.v:40:10: End label 'generate_for_bad' does not match begin label 'generate_for'
40 | end : generate_for_bad
| ^~~~~~~~~~~~~~~~
%Warning-ENDLABEL: t/t_hierarchy_identifier_bad.v:47:10: End label 'generate_if_if_bad' does not match begin label 'generate_if_if'
%Error-ENDLABEL: t/t_hierarchy_identifier_bad.v:47:10: End label 'generate_if_if_bad' does not match begin label 'generate_if_if'
47 | end : generate_if_if_bad
| ^~~~~~~~~~~~~~~~~~
%Warning-ENDLABEL: t/t_hierarchy_identifier_bad.v:51:10: End label 'generate_if_else_bad' does not match begin label 'generate_if_else'
%Error-ENDLABEL: t/t_hierarchy_identifier_bad.v:51:10: End label 'generate_if_else_bad' does not match begin label 'generate_if_else'
51 | end : generate_if_else_bad
| ^~~~~~~~~~~~~~~~~~~~
%Warning-ENDLABEL: t/t_hierarchy_identifier_bad.v:54:13: End label 't_bad' does not match begin label 't'
%Error-ENDLABEL: t/t_hierarchy_identifier_bad.v:54:13: End label 't_bad' does not match begin label 't'
54 | endmodule : t_bad
| ^~~~~
%Error: Exiting due to