From 4c885f65e1093dcfbae9effd245cad2122a6da4d Mon Sep 17 00:00:00 2001 From: steve Date: Wed, 17 May 2006 16:49:30 +0000 Subject: [PATCH] Error message if concat expression cannot evaluate. --- eval.cc | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/eval.cc b/eval.cc index 0c861d334..636845dd8 100644 --- a/eval.cc +++ b/eval.cc @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #ifdef HAVE_CVS_IDENT -#ident "$Id: eval.cc,v 1.40 2006/04/10 00:37:42 steve Exp $" +#ident "$Id: eval.cc,v 1.41 2006/05/17 16:49:30 steve Exp $" #endif # include "config.h" @@ -150,7 +150,15 @@ verinum* PEConcat::eval_const(const Design*des, NetScope*scope) const return 0; for (unsigned idx = 1 ; idx < parms_.count() ; idx += 1) { + verinum*tmp = parms_[idx]->eval_const(des, scope); + if (tmp == 0) { + cerr << get_line() << ": error: " + << "Unable to evaluate constant expression in concat: " + << *parms_[idx] << endl; + delete accum; + return 0; + } assert(tmp); *accum = concat(*accum, *tmp); @@ -271,6 +279,9 @@ verinum* PEUnary::eval_const(const Design*des, NetScope*scope) const /* * $Log: eval.cc,v $ + * Revision 1.41 2006/05/17 16:49:30 steve + * Error message if concat expression cannot evaluate. + * * Revision 1.40 2006/04/10 00:37:42 steve * Add support for generate loops w/ wires and gates. *