Add BADVLTPRAGMA on unknown Verilator pragmas (#5945).

This commit is contained in:
Wilson Snyder
2025-04-29 18:18:54 -04:00
parent 8da539ed8a
commit 9b3fccdcb7
6 changed files with 23 additions and 9 deletions
+1 -1
View File
@@ -196,7 +196,7 @@ void V3ParseImp::lexVerilatorCmtBad(FileLine* fl, const char* textp) {
string cmtname;
for (int i = 0; std::isalnum(cmtparse[i]); i++) cmtname += cmtparse[i];
if (!v3Global.opt.isFuture(cmtname)) {
fl->v3error("Unknown verilator comment: '" << textp << "'");
fl->v3warn(BADVLTPRAGMA, "Unknown verilator comment: '" << textp << "'");
}
}