mirror of
https://github.com/verilator/verilator.git
synced 2026-10-08 02:53:12 +02:00
Fix false EOFNEWLINE warning when DOS carriage returns present (#3171).
This commit is contained in:
@@ -24,6 +24,7 @@ Verilator 4.213 devel
|
||||
* Fix cygwin compile error due to missing -std=gnu++14 (#3149). [Sun Kim]
|
||||
* Fix missing install of vl_file_copy/vl_hier_graph (#3165). [Popolon]
|
||||
* Fix calling new with arguments in same class (#3166). [Matthew Ballance]
|
||||
* Fix false EOFNEWLINE warning when DOS carriage returns present (#3171).
|
||||
|
||||
|
||||
Verilator 4.212 2021-09-01
|
||||
|
||||
+2
-4
@@ -824,9 +824,7 @@ void V3PreProcImp::openFile(FileLine*, VInFilter* filterp, const string& filenam
|
||||
for (const char* cp = sp; cp < ep; cp++) {
|
||||
if (VL_UNLIKELY(*cp == '\r' || *cp == '\0')) {
|
||||
strip = true;
|
||||
break;
|
||||
}
|
||||
if (VL_UNLIKELY(*cp == '\n')) {
|
||||
} else if (VL_UNLIKELY(*cp == '\n')) {
|
||||
eof_newline = 0;
|
||||
++eof_lineno;
|
||||
} else {
|
||||
@@ -853,7 +851,7 @@ void V3PreProcImp::openFile(FileLine*, VInFilter* filterp, const string& filenam
|
||||
FileLine* fl = new FileLine{flsp};
|
||||
fl->contentLineno(eof_lineno);
|
||||
fl->column(eof_newline + 1, eof_newline + 1);
|
||||
fl->v3warn(EOFNEWLINE, "Missing newline at end of file (POSIX 3.206)."
|
||||
fl->v3warn(EOFNEWLINE, "Missing newline at end of file (POSIX 3.206).\n"
|
||||
<< fl->warnMore() << "... Suggest add newline.");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,6 +11,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
|
||||
scenarios(simulator => 1);
|
||||
|
||||
compile(
|
||||
verilator_flags2 => ['-Wall -Wno-DECLFILENAME'], # To check EOFNEWLINE with DOS CRs
|
||||
);
|
||||
|
||||
execute(
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
%Warning-EOFNEWLINE: obj_vlt/t_lint_eofline_bad/t_lint_eofline_bad.v:4:10: Missing newline at end of file (POSIX 3.206). : ... Suggest add newline.
|
||||
%Warning-EOFNEWLINE: obj_vlt/t_lint_eofline_bad/t_lint_eofline_bad.v:4:10: Missing newline at end of file (POSIX 3.206).
|
||||
: ... Suggest add newline.
|
||||
4 | endmodule
|
||||
| ^
|
||||
... For warning description see https://verilator.org/warn/EOFNEWLINE?v=latest
|
||||
|
||||
Reference in New Issue
Block a user