From fce158b8adb4c3392c77fe65be0fea026aa6cb82 Mon Sep 17 00:00:00 2001 From: Wilson Snyder Date: Wed, 30 Nov 2011 16:20:43 -0500 Subject: [PATCH] Make DETECTARRAY so can turn off for lint --- src/V3Changed.cpp | 2 +- src/V3Error.cpp | 12 ++++++------ src/V3Error.h | 3 ++- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/V3Changed.cpp b/src/V3Changed.cpp index e4f31d214..337a6a2f8 100644 --- a/src/V3Changed.cpp +++ b/src/V3Changed.cpp @@ -73,7 +73,7 @@ private: AstVar* varp = vscp->varp(); vscp->v3warn(IMPERFECTSCH,"Imperfect scheduling of variable: "<dtypeSkipRefp()->castBasicDType()) { - vscp->v3error("Unsupported: Can't detect changes on arrayed variable (probably with UNOPTFLAT warning suppressed): "<prettyName()); + vscp->v3warn(E_DETECTARRAY, "Unsupported: Can't detect changes on arrayed variable (probably with UNOPTFLAT warning suppressed): "<prettyName()); } else { string newvarname = "__Vchglast__"+vscp->scopep()->nameDotless()+"__"+varp->shortName(); // Create: VARREF(_last) diff --git a/src/V3Error.cpp b/src/V3Error.cpp index c3bc4cc8e..3686620ba 100644 --- a/src/V3Error.cpp +++ b/src/V3Error.cpp @@ -55,7 +55,7 @@ v3errorIniter v3errorInit; V3ErrorCode::V3ErrorCode(const char* msgp) { // Return error encoding for given string, or ERROR, which is a bad code - for (int codei=V3ErrorCode::EC_FIRST_WARN; codeiwarnIsOff(code)) { this->warnOff(code, true); @@ -396,7 +396,7 @@ string V3Error::v3sform (const char* format, ...) { } void V3Error::suppressThisWarning() { - if (s_errorCode>=V3ErrorCode::EC_FIRST_WARN) { + if (s_errorCode>=V3ErrorCode::EC_MIN) { V3Stats::addStatSum(string("Warnings, Suppressed ")+s_errorCode.ascii(), 1); s_errorSuppressed = true; } diff --git a/src/V3Error.h b/src/V3Error.h index 72f1e62f9..2984f0c20 100644 --- a/src/V3Error.h +++ b/src/V3Error.h @@ -49,6 +49,7 @@ public: I_DEF_NETTYPE_WIRE, // `default_nettype is WIRE (false=NONE) // Error codes: E_BLKLOOPINIT, // Error: Delayed assignment to array inside for loops + E_DETECTARRAY, // Error: Unsupported: Can't detect changes on arrayed variable E_MULTITOP, // Error: Multiple top level modules E_TASKNSVAR, // Error: Task I/O not simple // @@ -106,7 +107,7 @@ public: // Boolean " I_COVERAGE", " I_TRACING", " I_LINT", " I_DEF_NETTYPE_WIRE", // Errors - "BLKLOOPINIT", "MULTITOP", "TASKNSVAR", + "BLKLOOPINIT", "DETECTARRAY", "MULTITOP", "TASKNSVAR", // Warnings " EC_FIRST_WARN", "ASSIGNDLY", "ASSIGNIN",