Convert unnamed error to new PKGNODECL error.
This commit is contained in:
parent
2d7d2c5992
commit
decbf79f39
|
|
@ -51,7 +51,6 @@ public:
|
||||||
I_DEF_NETTYPE_WIRE, // `default_nettype is WIRE (false=NONE)
|
I_DEF_NETTYPE_WIRE, // `default_nettype is WIRE (false=NONE)
|
||||||
// Error codes:
|
// Error codes:
|
||||||
E_DETECTARRAY, // Error: Unsupported: Can't detect changes on arrayed variable
|
E_DETECTARRAY, // Error: Unsupported: Can't detect changes on arrayed variable
|
||||||
E_PKGNODECL, // Error: Package/class needs to be predeclared
|
|
||||||
E_PORTSHORT, // Error: Output port is connected to a constant, electrical short
|
E_PORTSHORT, // Error: Output port is connected to a constant, electrical short
|
||||||
E_UNSUPPORTED, // Error: Unsupported (generally)
|
E_UNSUPPORTED, // Error: Unsupported (generally)
|
||||||
E_TASKNSVAR, // Error: Task I/O not simple
|
E_TASKNSVAR, // Error: Task I/O not simple
|
||||||
|
|
@ -99,6 +98,7 @@ public:
|
||||||
PINMISSING, // Cell pin not specified
|
PINMISSING, // Cell pin not specified
|
||||||
PINNOCONNECT, // Cell pin not connected
|
PINNOCONNECT, // Cell pin not connected
|
||||||
PINCONNECTEMPTY,// Cell pin connected by name with empty reference
|
PINCONNECTEMPTY,// Cell pin connected by name with empty reference
|
||||||
|
PKGNODECL, // Error: Package/class needs to be predeclared
|
||||||
PROCASSWIRE, // Procedural assignment on wire
|
PROCASSWIRE, // Procedural assignment on wire
|
||||||
REALCVT, // Real conversion
|
REALCVT, // Real conversion
|
||||||
REDEFMACRO, // Redefining existing define macro
|
REDEFMACRO, // Redefining existing define macro
|
||||||
|
|
@ -146,7 +146,7 @@ public:
|
||||||
// Boolean
|
// Boolean
|
||||||
" I_CELLDEFINE", " I_COVERAGE", " I_TRACING", " I_LINT", " I_DEF_NETTYPE_WIRE",
|
" I_CELLDEFINE", " I_COVERAGE", " I_TRACING", " I_LINT", " I_DEF_NETTYPE_WIRE",
|
||||||
// Errors
|
// Errors
|
||||||
"DETECTARRAY", "PKGNODECL", "PORTSHORT", "UNSUPPORTED", "TASKNSVAR",
|
"DETECTARRAY", "PORTSHORT", "UNSUPPORTED", "TASKNSVAR",
|
||||||
// Warnings
|
// Warnings
|
||||||
" EC_FIRST_WARN",
|
" EC_FIRST_WARN",
|
||||||
"ALWCOMBORDER", "ASSIGNDLY", "ASSIGNIN",
|
"ALWCOMBORDER", "ASSIGNDLY", "ASSIGNIN",
|
||||||
|
|
@ -160,7 +160,7 @@ public:
|
||||||
"INCABSPATH", "INFINITELOOP", "INITIALDLY", "INSECURE",
|
"INCABSPATH", "INFINITELOOP", "INITIALDLY", "INSECURE",
|
||||||
"LITENDIAN", "MODDUP",
|
"LITENDIAN", "MODDUP",
|
||||||
"MULTIDRIVEN", "MULTITOP",
|
"MULTIDRIVEN", "MULTITOP",
|
||||||
"PINMISSING", "PINNOCONNECT", "PINCONNECTEMPTY", "PROCASSWIRE",
|
"PINMISSING", "PINNOCONNECT", "PINCONNECTEMPTY", "PKGNODECL", "PROCASSWIRE",
|
||||||
"REALCVT", "REDEFMACRO",
|
"REALCVT", "REDEFMACRO",
|
||||||
"SELRANGE", "SHORTREAL", "SPLITVAR", "STMTDLY", "SYMRSVDWORD", "SYNCASYNCNET",
|
"SELRANGE", "SHORTREAL", "SPLITVAR", "STMTDLY", "SYMRSVDWORD", "SYNCASYNCNET",
|
||||||
"TICKCOUNT", "TIMESCALEMOD",
|
"TICKCOUNT", "TIMESCALEMOD",
|
||||||
|
|
@ -183,7 +183,7 @@ public:
|
||||||
// Later -Werror- options may make more of these.
|
// Later -Werror- options may make more of these.
|
||||||
bool pretendError() const {
|
bool pretendError() const {
|
||||||
return (m_e == ASSIGNIN || m_e == BLKANDNBLK || m_e == BLKLOOPINIT || m_e == CONTASSREG
|
return (m_e == ASSIGNIN || m_e == BLKANDNBLK || m_e == BLKLOOPINIT || m_e == CONTASSREG
|
||||||
|| m_e == IMPURE || m_e == PROCASSWIRE //
|
|| m_e == IMPURE || m_e == PKGNODECL || m_e == PROCASSWIRE //
|
||||||
|| m_e == TIMESCALEMOD); // Says IEEE
|
|| m_e == TIMESCALEMOD); // Says IEEE
|
||||||
}
|
}
|
||||||
// Warnings to mention manual
|
// Warnings to mention manual
|
||||||
|
|
|
||||||
|
|
@ -201,8 +201,8 @@ private:
|
||||||
UINFO(2, "Link Module: " << nodep << endl);
|
UINFO(2, "Link Module: " << nodep << endl);
|
||||||
if (nodep->fileline()->filebasenameNoExt() != nodep->prettyName()
|
if (nodep->fileline()->filebasenameNoExt() != nodep->prettyName()
|
||||||
&& !v3Global.opt.isLibraryFile(nodep->fileline()->filename())
|
&& !v3Global.opt.isLibraryFile(nodep->fileline()->filename())
|
||||||
&& !VN_IS(nodep, NotFoundModule)
|
&& !VN_IS(nodep, NotFoundModule) && !nodep->recursiveClone()
|
||||||
&& !nodep->recursiveClone() && !nodep->internal()) {
|
&& !nodep->internal()) {
|
||||||
// We only complain once per file, otherwise library-like files
|
// We only complain once per file, otherwise library-like files
|
||||||
// have a huge mess of warnings
|
// have a huge mess of warnings
|
||||||
if (m_declfnWarned.find(nodep->fileline()->filename()) == m_declfnWarned.end()) {
|
if (m_declfnWarned.find(nodep->fileline()->filename()) == m_declfnWarned.end()) {
|
||||||
|
|
|
||||||
|
|
@ -531,9 +531,9 @@ void V3ParseImp::tokenPipelineSym() {
|
||||||
// is missing package, and this confuses people
|
// is missing package, and this confuses people
|
||||||
static int warned = false;
|
static int warned = false;
|
||||||
if (!warned++) {
|
if (!warned++) {
|
||||||
yylval.fl->v3warn(E_PKGNODECL, "Package/class '" + *yylval.strp
|
yylval.fl->v3warn(PKGNODECL, "Package/class '" + *yylval.strp
|
||||||
+ "' not found, and needs to be "
|
+ "' not found, and needs to be "
|
||||||
"predeclared (IEEE 1800-2017 26.3)");
|
"predeclared (IEEE 1800-2017 26.3)");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (token == yaID__LEX) {
|
} else if (token == yaID__LEX) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue