From d6b10465f39abcc86b76f40926ca2a7c6f0e63cb Mon Sep 17 00:00:00 2001 From: Wilson Snyder Date: Mon, 18 Sep 2017 23:06:31 -0400 Subject: [PATCH] Improve more errors to note IEEE --- src/V3Width.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/V3Width.cpp b/src/V3Width.cpp index 0f31741f4..bc35b02d7 100644 --- a/src/V3Width.cpp +++ b/src/V3Width.cpp @@ -445,7 +445,7 @@ private: if (!constp) { nodep->v3error("Replication value isn't a constant."); return; } uint32_t times = constp->toUInt(); if (times==0 && !nodep->backp()->castConcat()) { // Concat Visitor will clean it up. - nodep->v3error("Replication value of 0 is only legal under a concatenation."); times=1; + nodep->v3error("Replication value of 0 is only legal under a concatenation (IEEE 2012 11.4.12.1)"); times=1; } if (nodep->lhsp()->isString()) { AstNode* newp = new AstReplicateN(nodep->fileline(),nodep->lhsp()->unlinkFrBack(), @@ -476,7 +476,7 @@ private: if (!constp) { nodep->v3error("Replication value isn't a constant."); return; } uint32_t times = constp->toUInt(); if (times==0 && !nodep->backp()->castConcat()) { // Concat Visitor will clean it up. - nodep->v3error("Replication value of 0 is only legal under a concatenation."); + nodep->v3error("Replication value of 0 is only legal under a concatenation (IEEE 2012 11.4.12.1)"); } nodep->dtypeSetString(); } @@ -1238,7 +1238,7 @@ private: } if (!itemp->valuep()) { if (num.isEqZero() && itemp != nodep->itemsp()) - itemp->v3error("Enum value wrapped around"); // IEEE says illegal + itemp->v3error("Enum value illegally wrapped around (IEEE 2012 6.19)"); if (!nodep->dtypep()->basicp() && !nodep->dtypep()->basicp()->keyword().isIntNumeric()) { itemp->v3error("Enum names without values only allowed on numeric types");