Generate better error messages for concat. with indefinite width.

This patch generates a more user friendly error message for a
concatenation with an indefinite width operand.
This commit is contained in:
Cary R 2009-04-09 14:48:16 -07:00 committed by Stephen Williams
parent fc8549c9f8
commit d0457a1ac2
1 changed files with 5 additions and 5 deletions

View File

@ -1617,7 +1617,7 @@ NetExpr* PEConcat::elaborate_expr(Design*des, NetScope*scope,
} }
if (tmp->expr_type() == IVL_VT_REAL) { if (tmp->expr_type() == IVL_VT_REAL) {
cerr << tmp->get_fileline() << ": error: concatenation " cerr << tmp->get_fileline() << ": error: Concatenation "
<< "repeat expression can not be REAL." << endl; << "repeat expression can not be REAL." << endl;
des->errors += 1; des->errors += 1;
return 0; return 0;
@ -1627,7 +1627,7 @@ NetExpr* PEConcat::elaborate_expr(Design*des, NetScope*scope,
if (rep == 0) { if (rep == 0) {
cerr << get_fileline() << ": error: " cerr << get_fileline() << ": error: "
"concatenation repeat expression cannot be evaluated." "Concatenation repeat expression cannot be evaluated."
<< endl; << endl;
cerr << get_fileline() << ": : The expression is: " cerr << get_fileline() << ": : The expression is: "
<< *tmp << endl; << *tmp << endl;
@ -1688,7 +1688,7 @@ NetExpr* PEConcat::elaborate_expr(Design*des, NetScope*scope,
if (ex->expr_type() == IVL_VT_REAL) { if (ex->expr_type() == IVL_VT_REAL) {
cerr << ex->get_fileline() << ": error: " cerr << ex->get_fileline() << ": error: "
<< "concatenation operand can not be real: " << "Concatenation operand can not be real: "
<< *parms_[idx] << endl; << *parms_[idx] << endl;
des->errors += 1; des->errors += 1;
continue; continue;
@ -1696,8 +1696,8 @@ NetExpr* PEConcat::elaborate_expr(Design*des, NetScope*scope,
if (! ex->has_width()) { if (! ex->has_width()) {
cerr << ex->get_fileline() << ": error: " cerr << ex->get_fileline() << ": error: "
<< "concatenation operand has indefinite width: " << "Concatenation operand \"" << *parms_[idx]
<< *ex << endl; << "\" has indefinite width." << endl;
des->errors += 1; des->errors += 1;
continue; continue;
} }