forked from github/verilator
With -Wpedantic change ASSIGNIN to a warning
This commit is contained in:
parent
45f955f175
commit
adf1de45de
@ -1530,6 +1530,8 @@ Summary:
|
||||
:command:`gcc -Wpedantic`. Rarely used, and intended only for strict
|
||||
compliance tests.
|
||||
|
||||
This option changes :option:`ASSIGNIN` from an error to a warning.
|
||||
|
||||
.. option:: -Wwarn-<message>
|
||||
|
||||
Enables the specified warning message.
|
||||
|
@ -1526,7 +1526,10 @@ void V3Options::parseOptsList(FileLine* fl, const string& optdir, int argc, char
|
||||
});
|
||||
DECL_OPTION("-vpi", OnOff, &m_vpi);
|
||||
|
||||
DECL_OPTION("-Wpedantic", OnOff, &m_pedantic);
|
||||
DECL_OPTION("-Wpedantic", CbCall, [this]() {
|
||||
m_pedantic = true;
|
||||
V3Error::pretendError(V3ErrorCode::ASSIGNIN, false);
|
||||
});
|
||||
DECL_OPTION("-Wall", CbCall, []() {
|
||||
FileLine::globalWarnLintOff(false);
|
||||
FileLine::globalWarnStyleOff(false);
|
||||
|
20
test_regress/t/t_var_in_assign_pedantic.pl
Executable file
20
test_regress/t/t_var_in_assign_pedantic.pl
Executable file
@ -0,0 +1,20 @@
|
||||
#!/usr/bin/env perl
|
||||
if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; }
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2005 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.
|
||||
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||
|
||||
scenarios(vlt => 1);
|
||||
|
||||
top_filename("t/t_var_in_assign_bad.v");
|
||||
|
||||
lint(
|
||||
verilator_flags2 => ['-Wpedantic -Wno-fatal'],
|
||||
);
|
||||
|
||||
ok(1);
|
||||
1;
|
Loading…
Reference in New Issue
Block a user