mirror of
https://github.com/verilator/verilator.git
synced 2026-08-30 01:38:21 +02:00
Convert re-defining macro error to warning.
git-svn-id: file://localhost/svn/verilator/trunk/verilator@1001 77ca24e4-aefa-0310-84f0-b9a241c72d87
This commit is contained in:
+2
-1
@@ -53,6 +53,7 @@ public:
|
||||
IMPLICIT, // Implicit wire
|
||||
IMPURE, // Impure function not being inlined
|
||||
MULTIDRIVEN, // Driven from multiple blocks
|
||||
REDEFMACRO, // Redefining existing define macro
|
||||
UNDRIVEN, // No drivers
|
||||
UNOPT, // Unoptimizable block
|
||||
UNOPTFLAT, // Unoptimizable block after flattening
|
||||
@@ -78,7 +79,7 @@ public:
|
||||
"BLKANDNBLK",
|
||||
"CASEINCOMPLETE", "CASEOVERLAP", "CASEX", "CMPCONST",
|
||||
"COMBDLY", "STMTDLY", "GENCLK", "IMPLICIT", "IMPURE",
|
||||
"MULTIDRIVEN",
|
||||
"MULTIDRIVEN", "REDEFMACRO",
|
||||
"UNDRIVEN", "UNOPT", "UNOPTFLAT", "UNSIGNED", "UNUSED",
|
||||
"VARHIDDEN", "WIDTH",
|
||||
" MAX"
|
||||
|
||||
+2
-2
@@ -207,8 +207,8 @@ void V3PreProcImp::define(FileLine* fl, const string& name, const string& value,
|
||||
UINFO(4,"DEFINE '"<<name<<"' as '"<<value<<"' params '"<<params<<"'"<<endl);
|
||||
if (defExists(name)) {
|
||||
if (!(defValue(name)==value && defParams(name)==params)) { // Duplicate defs are OK
|
||||
fl->v3error("Define already exists: "<<name);
|
||||
defFileline(name)->v3error("Previous definition is here.");
|
||||
fl->v3warn(REDEFMACRO,"Redefining existing define: "<<name<<", with different value: "<<value<<" "<<params);
|
||||
defFileline(name)->v3warn(REDEFMACRO,"Previous definition is here, with value: "<<defValue(name)<<" "<<defParams(name));
|
||||
}
|
||||
undef(name);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user