Using command line -Wno-{WARNING} now overrides file-local lint_on.
This commit is contained in:
parent
5f262a8f11
commit
9f0d7e50a5
2
Changes
2
Changes
|
@ -5,6 +5,8 @@ indicates the contributor was also the author of the fix; Thanks!
|
||||||
|
|
||||||
* Verilator 3.861 devel
|
* Verilator 3.861 devel
|
||||||
|
|
||||||
|
*** Using command line -Wno-{WARNING} now overrides file-local lint_on.
|
||||||
|
|
||||||
*** Support SV 2012 package import before port list.
|
*** Support SV 2012 package import before port list.
|
||||||
|
|
||||||
**** Fix huge shifts to zero with -Wno-WIDTH, bug765. [Clifford Wolf]
|
**** Fix huge shifts to zero with -Wno-WIDTH, bug765. [Clifford Wolf]
|
||||||
|
|
|
@ -1088,7 +1088,8 @@ supports which the older version does not support.
|
||||||
|
|
||||||
=item -Wno-I<message>
|
=item -Wno-I<message>
|
||||||
|
|
||||||
Disable the specified warning message.
|
Disable the specified warning message. This will override any lint_on
|
||||||
|
directives in the source, i.e. the warning will still not be printed.
|
||||||
|
|
||||||
=item -Wno-lint
|
=item -Wno-lint
|
||||||
|
|
||||||
|
@ -1918,6 +1919,9 @@ Disables the specified lint warning, in the specified filename (or wildcard
|
||||||
with '*' or '?', or all files if omitted) and range of line numbers (or all
|
with '*' or '?', or all files if omitted) and range of line numbers (or all
|
||||||
lines if omitted).
|
lines if omitted).
|
||||||
|
|
||||||
|
Using '*' will override any lint_on directives in the source, i.e. the
|
||||||
|
warning will still not be printed.
|
||||||
|
|
||||||
If the -msg is omitted, all lint warnings are disabled. This will override
|
If the -msg is omitted, all lint warnings are disabled. This will override
|
||||||
all later lint warning enables for the specified region.
|
all later lint warning enables for the specified region.
|
||||||
|
|
||||||
|
|
|
@ -253,6 +253,7 @@ void FileLine::warnStyleOff(bool flag) {
|
||||||
|
|
||||||
bool FileLine::warnIsOff(V3ErrorCode code) const {
|
bool FileLine::warnIsOff(V3ErrorCode code) const {
|
||||||
if (!m_warnOn.test(code)) return true;
|
if (!m_warnOn.test(code)) return true;
|
||||||
|
if (!defaultFileLine().m_warnOn.test(code)) return true; // Global overrides local
|
||||||
// UNOPTFLAT implies UNOPT
|
// UNOPTFLAT implies UNOPT
|
||||||
if (code==V3ErrorCode::UNOPT && !m_warnOn.test(V3ErrorCode::UNOPTFLAT)) return true;
|
if (code==V3ErrorCode::UNOPT && !m_warnOn.test(V3ErrorCode::UNOPTFLAT)) return true;
|
||||||
if ((code.lintError() || code.styleError()) && !m_warnOn.test(V3ErrorCode::I_LINT)) return true;
|
if ((code.lintError() || code.styleError()) && !m_warnOn.test(V3ErrorCode::I_LINT)) return true;
|
||||||
|
|
|
@ -0,0 +1,20 @@
|
||||||
|
#!/usr/bin/perl
|
||||||
|
if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; }
|
||||||
|
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||||
|
#
|
||||||
|
# Copyright 2008 by Wilson Snyder. This program is free software; you can
|
||||||
|
# redistribute it and/or modify it under the terms of either the GNU
|
||||||
|
# Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
|
# Version 2.0.
|
||||||
|
|
||||||
|
$Self->{vlt} or $Self->skip("Verilator only test");
|
||||||
|
|
||||||
|
compile (
|
||||||
|
v_flags2 => ["--lint-only -Wno-WIDTH"],
|
||||||
|
verilator_make_gcc => 0,
|
||||||
|
make_top_shell => 0,
|
||||||
|
make_main => 0,
|
||||||
|
);
|
||||||
|
|
||||||
|
ok(1);
|
||||||
|
1;
|
|
@ -0,0 +1,20 @@
|
||||||
|
// DESCRIPTION: Verilator: Verilog Test module
|
||||||
|
//
|
||||||
|
// This file ONLY is placed into the Public Domain, for any use,
|
||||||
|
// without warranty, 2008 by Wilson Snyder.
|
||||||
|
|
||||||
|
module t;
|
||||||
|
|
||||||
|
// width warnings off due to command line
|
||||||
|
wire A = 15'd1234;
|
||||||
|
|
||||||
|
// width warnings off due to command line + manual switch
|
||||||
|
// verilator lint_off WIDTH
|
||||||
|
wire B = 15'd1234;
|
||||||
|
|
||||||
|
// this turnon does nothing as off on command line
|
||||||
|
// verilator lint_on WIDTH
|
||||||
|
wire C = 15'd1234;
|
||||||
|
|
||||||
|
endmodule
|
||||||
|
|
Loading…
Reference in New Issue