diff --git a/src/V3Error.h b/src/V3Error.h index 9ff7d6a95..a1846e8e4 100644 --- a/src/V3Error.h +++ b/src/V3Error.h @@ -51,7 +51,6 @@ public: I_DEF_NETTYPE_WIRE, // `default_nettype is WIRE (false=NONE) // Error codes: 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_UNSUPPORTED, // Error: Unsupported (generally) E_TASKNSVAR, // Error: Task I/O not simple @@ -99,6 +98,7 @@ public: PINMISSING, // Cell pin not specified PINNOCONNECT, // Cell pin not connected PINCONNECTEMPTY,// Cell pin connected by name with empty reference + PKGNODECL, // Error: Package/class needs to be predeclared PROCASSWIRE, // Procedural assignment on wire REALCVT, // Real conversion REDEFMACRO, // Redefining existing define macro @@ -146,7 +146,7 @@ public: // Boolean " I_CELLDEFINE", " I_COVERAGE", " I_TRACING", " I_LINT", " I_DEF_NETTYPE_WIRE", // Errors - "DETECTARRAY", "PKGNODECL", "PORTSHORT", "UNSUPPORTED", "TASKNSVAR", + "DETECTARRAY", "PORTSHORT", "UNSUPPORTED", "TASKNSVAR", // Warnings " EC_FIRST_WARN", "ALWCOMBORDER", "ASSIGNDLY", "ASSIGNIN", @@ -160,7 +160,7 @@ public: "INCABSPATH", "INFINITELOOP", "INITIALDLY", "INSECURE", "LITENDIAN", "MODDUP", "MULTIDRIVEN", "MULTITOP", - "PINMISSING", "PINNOCONNECT", "PINCONNECTEMPTY", "PROCASSWIRE", + "PINMISSING", "PINNOCONNECT", "PINCONNECTEMPTY", "PKGNODECL", "PROCASSWIRE", "REALCVT", "REDEFMACRO", "SELRANGE", "SHORTREAL", "SPLITVAR", "STMTDLY", "SYMRSVDWORD", "SYNCASYNCNET", "TICKCOUNT", "TIMESCALEMOD", @@ -183,7 +183,7 @@ public: // Later -Werror- options may make more of these. bool pretendError() const { 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 } // Warnings to mention manual diff --git a/src/V3LinkCells.cpp b/src/V3LinkCells.cpp index e35c74bb6..0ded538bc 100644 --- a/src/V3LinkCells.cpp +++ b/src/V3LinkCells.cpp @@ -201,8 +201,8 @@ private: UINFO(2, "Link Module: " << nodep << endl); if (nodep->fileline()->filebasenameNoExt() != nodep->prettyName() && !v3Global.opt.isLibraryFile(nodep->fileline()->filename()) - && !VN_IS(nodep, NotFoundModule) - && !nodep->recursiveClone() && !nodep->internal()) { + && !VN_IS(nodep, NotFoundModule) && !nodep->recursiveClone() + && !nodep->internal()) { // We only complain once per file, otherwise library-like files // have a huge mess of warnings if (m_declfnWarned.find(nodep->fileline()->filename()) == m_declfnWarned.end()) { diff --git a/src/V3ParseImp.cpp b/src/V3ParseImp.cpp index f3ba4c5c3..bf8867daf 100644 --- a/src/V3ParseImp.cpp +++ b/src/V3ParseImp.cpp @@ -531,9 +531,9 @@ void V3ParseImp::tokenPipelineSym() { // is missing package, and this confuses people static int warned = false; if (!warned++) { - yylval.fl->v3warn(E_PKGNODECL, "Package/class '" + *yylval.strp - + "' not found, and needs to be " - "predeclared (IEEE 1800-2017 26.3)"); + yylval.fl->v3warn(PKGNODECL, "Package/class '" + *yylval.strp + + "' not found, and needs to be " + "predeclared (IEEE 1800-2017 26.3)"); } } } else if (token == yaID__LEX) {