Less verbosity for IEEE warnings in earlier commit this rev.

This commit is contained in:
Wilson Snyder
2017-09-21 22:07:49 -04:00
parent 47e13cfdf4
commit 89f414b185
3 changed files with 11 additions and 4 deletions
+6 -1
View File
@@ -139,7 +139,12 @@ V3Number::V3Number (FileLine* fileline, const char* sourcep) {
this->opAdd(product,addend);
if (product.bitsValue(width(), 4)) { // Overflowed
m_fileline->v3error("Too many digits for "<<width()<<" bit number: "<<sourcep);
if (!m_sized) m_fileline->v3error("As that number was unsized ('d...) it is limited to 32 bits (IEEE 2012 5.7.1)");
if (!m_sized) {
static int warned = false;
if (!warned++) {
m_fileline->v3error("As that number was unsized ('d...) it is limited to 32 bits (IEEE 2012 5.7.1)");
}
}
while (*(cp+1)) cp++; // Skip ahead so don't get multiple warnings
}
}