mirror of
https://github.com/verilator/verilator.git
synced 2026-09-03 04:03:36 +02:00
Improve too-small cast warning to show size
This commit is contained in:
+1
-1
@@ -2631,7 +2631,7 @@ class WidthVisitor final : public VNVisitor {
|
||||
if (m_vup->prelim()) {
|
||||
int width = nodep->rhsp()->toSInt();
|
||||
if (width < 1) {
|
||||
nodep->v3error("Size-changing cast to zero or negative size");
|
||||
nodep->v3error("Size-changing cast to zero or negative size: " << width);
|
||||
width = 1;
|
||||
}
|
||||
userIterateAndNext(nodep->lhsp(), WidthVP{SELF, PRELIM}.p());
|
||||
|
||||
Reference in New Issue
Block a user