Skip to content

Commit

Permalink
More verbose eval_const assert message.
Browse files Browse the repository at this point in the history
  • Loading branch information
steve committed Oct 13, 2002
1 parent 54a8e12 commit 1eb714e
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion eval.cc
Expand Up @@ -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.30 2002/08/12 01:34:59 steve Exp $"
#ident "$Id: eval.cc,v 1.31 2002/10/13 05:01:07 steve Exp $"
#endif

# include "config.h"
Expand Down Expand Up @@ -143,6 +143,12 @@ verinum* PEIdent::eval_const(const Design*des, const NetScope*scope) const
return 0;

const NetEConst*eval = dynamic_cast<const NetEConst*>(expr);
if (eval == 0) {
cerr << get_line() << ": internal error: Unable to evaluate "
<< "constant expression: " << *expr << endl;
return 0;
}

assert(eval);

if (msb_ || lsb_)
Expand Down Expand Up @@ -219,6 +225,9 @@ verinum* PEUnary::eval_const(const Design*des, const NetScope*scope) const

/*
* $Log: eval.cc,v $
* Revision 1.31 2002/10/13 05:01:07 steve
* More verbose eval_const assert message.
*
* Revision 1.30 2002/08/12 01:34:59 steve
* conditional ident string using autoconfig.
*
Expand Down

0 comments on commit 1eb714e

Please sign in to comment.