From 8fd42fbf61744421496ea71a805d954e02d78d1f Mon Sep 17 00:00:00 2001 From: steve Date: Mon, 4 Jun 2007 19:14:06 +0000 Subject: [PATCH] Build errors in picky GCC compilers. --- PExpr.h | 23 +++++++++++++---------- eval.cc | 23 +++++++++++++---------- eval_attrib.cc | 8 +++++--- util.h | 8 +++++--- 4 files changed, 36 insertions(+), 26 deletions(-) diff --git a/PExpr.h b/PExpr.h index 9f2ae6c16..82a35035c 100644 --- a/PExpr.h +++ b/PExpr.h @@ -19,7 +19,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #ifdef HAVE_CVS_IDENT -#ident "$Id: PExpr.h,v 1.89 2007/06/04 02:19:07 steve Exp $" +#ident "$Id: PExpr.h,v 1.90 2007/06/04 19:14:06 steve Exp $" #endif # include @@ -125,7 +125,7 @@ class PExpr : public LineInfo { // This attempts to evaluate a constant expression, and return // a verinum as a result. If the expression cannot be // evaluated, return 0. - virtual verinum* eval_const(const Design*des, NetScope*sc) const; + virtual verinum* eval_const(Design*des, NetScope*sc) const; // This method returns true if that expression is the same as // this expression. This method is used for comparing @@ -151,7 +151,7 @@ class PEConcat : public PExpr { PEConcat(const svector&p, PExpr*r =0); ~PEConcat(); - virtual verinum* eval_const(const Design*des, NetScope*sc) const; + virtual verinum* eval_const(Design*des, NetScope*sc) const; virtual void dump(ostream&) const; virtual NetNet* elaborate_lnet(Design*des, NetScope*scope, @@ -222,7 +222,7 @@ class PEFNumber : public PExpr { /* The eval_const method as applied to a floating point number gets the *integer* value of the number. This accounts for any rounding that is needed to get the value. */ - virtual verinum* eval_const(const Design*des, NetScope*sc) const; + virtual verinum* eval_const(Design*des, NetScope*sc) const; /* A PEFNumber is a constant, so this returns true. */ virtual bool is_constant(Module*) const; @@ -290,7 +290,7 @@ class PEIdent : public PExpr { NetNet* elaborate_port(Design*des, NetScope*sc) const; virtual bool is_constant(Module*) const; - verinum* eval_const(const Design*des, NetScope*sc) const; + verinum* eval_const(Design*des, NetScope*sc) const; const pform_name_t& path() const { return path_; } @@ -400,7 +400,7 @@ class PENumber : public PExpr { NetScope*scope, bool is_force) const; - virtual verinum* eval_const(const Design*des, NetScope*sc) const; + virtual verinum* eval_const(Design*des, NetScope*sc) const; virtual bool is_the_same(const PExpr*that) const; virtual bool is_constant(Module*) const; @@ -439,7 +439,7 @@ class PEString : public PExpr { virtual NetEConst*elaborate_expr(Design*des, NetScope*, int expr_width, bool) const; virtual NetEConst*elaborate_pexpr(Design*des, NetScope*sc) const; - verinum* eval_const(const Design*, NetScope*) const; + verinum* eval_const(Design*, NetScope*) const; virtual bool is_constant(Module*) const; @@ -465,7 +465,7 @@ class PEUnary : public PExpr { virtual NetExpr*elaborate_expr(Design*des, NetScope*, int expr_width, bool sys_task_arg) const; virtual NetExpr*elaborate_pexpr(Design*des, NetScope*sc) const; - virtual verinum* eval_const(const Design*des, NetScope*sc) const; + virtual verinum* eval_const(Design*des, NetScope*sc) const; virtual bool is_constant(Module*) const; @@ -498,7 +498,7 @@ class PEBinary : public PExpr { virtual NetEBinary*elaborate_expr(Design*des, NetScope*, int expr_width, bool sys_task_arg) const; virtual NetExpr*elaborate_pexpr(Design*des, NetScope*sc) const; - virtual verinum* eval_const(const Design*des, NetScope*sc) const; + virtual verinum* eval_const(Design*des, NetScope*sc) const; protected: char op_; @@ -606,7 +606,7 @@ class PETernary : public PExpr { virtual NetETernary*elaborate_expr(Design*des, NetScope*, int expr_width, bool sys_task_arg) const; virtual NetETernary*elaborate_pexpr(Design*des, NetScope*sc) const; - virtual verinum* eval_const(const Design*des, NetScope*sc) const; + virtual verinum* eval_const(Design*des, NetScope*sc) const; private: PExpr*expr_; @@ -657,6 +657,9 @@ class PECallFunction : public PExpr { /* * $Log: PExpr.h,v $ + * Revision 1.90 2007/06/04 19:14:06 steve + * Build errors in picky GCC compilers. + * * Revision 1.89 2007/06/04 02:19:07 steve * Handle bit/part select of array words in nets. * diff --git a/eval.cc b/eval.cc index 550b20969..69cbd795b 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.46 2007/05/24 04:07:12 steve Exp $" +#ident "$Id: eval.cc,v 1.47 2007/06/04 19:14:06 steve Exp $" #endif # include "config.h" @@ -29,12 +29,12 @@ # include "netmisc.h" # include "compiler.h" -verinum* PExpr::eval_const(const Design*, NetScope*) const +verinum* PExpr::eval_const(Design*, NetScope*) const { return 0; } -verinum* PEBinary::eval_const(const Design*des, NetScope*scope) const +verinum* PEBinary::eval_const(Design*des, NetScope*scope) const { verinum*l = left_->eval_const(des, scope); if (l == 0) return 0; @@ -143,7 +143,7 @@ verinum* PEBinary::eval_const(const Design*des, NetScope*scope) const delete r; return res; } -verinum* PEConcat::eval_const(const Design*des, NetScope*scope) const +verinum* PEConcat::eval_const(Design*des, NetScope*scope) const { verinum*accum = parms_[0]->eval_const(des, scope); if (accum == 0) @@ -170,7 +170,7 @@ verinum* PEConcat::eval_const(const Design*des, NetScope*scope) const * Evaluate an identifier as a constant expression. This is only * possible if the identifier is that of a parameter. */ -verinum* PEIdent::eval_const(const Design*des, NetScope*scope) const +verinum* PEIdent::eval_const(Design*des, NetScope*scope) const { assert(scope); NetNet*net; @@ -209,23 +209,23 @@ verinum* PEIdent::eval_const(const Design*des, NetScope*scope) const return new verinum(eval->value()); } -verinum* PEFNumber::eval_const(const Design*, NetScope*) const +verinum* PEFNumber::eval_const(Design*, NetScope*) const { long val = value_->as_long(); return new verinum(val); } -verinum* PENumber::eval_const(const Design*, NetScope*) const +verinum* PENumber::eval_const(Design*, NetScope*) const { return new verinum(value()); } -verinum* PEString::eval_const(const Design*, NetScope*) const +verinum* PEString::eval_const(Design*, NetScope*) const { return new verinum(string(text_)); } -verinum* PETernary::eval_const(const Design*des, NetScope*scope) const +verinum* PETernary::eval_const(Design*des, NetScope*scope) const { verinum*test = expr_->eval_const(des, scope); if (test == 0) @@ -245,7 +245,7 @@ verinum* PETernary::eval_const(const Design*des, NetScope*scope) const } } -verinum* PEUnary::eval_const(const Design*des, NetScope*scope) const +verinum* PEUnary::eval_const(Design*des, NetScope*scope) const { verinum*val = expr_->eval_const(des, scope); if (val == 0) @@ -276,6 +276,9 @@ verinum* PEUnary::eval_const(const Design*des, NetScope*scope) const /* * $Log: eval.cc,v $ + * Revision 1.47 2007/06/04 19:14:06 steve + * Build errors in picky GCC compilers. + * * Revision 1.46 2007/05/24 04:07:12 steve * Rework the heirarchical identifier parse syntax and pform * to handle more general combinations of heirarch and bit selects. diff --git a/eval_attrib.cc b/eval_attrib.cc index 1a0003479..dfc488041 100644 --- a/eval_attrib.cc +++ b/eval_attrib.cc @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #ifdef HAVE_CVS_IDENT -#ident "$Id: eval_attrib.cc,v 1.8 2005/11/27 17:01:57 steve Exp $" +#ident "$Id: eval_attrib.cc,v 1.9 2007/06/04 19:14:06 steve Exp $" #endif # include "config.h" @@ -35,8 +35,7 @@ attrib_list_t* evaluate_attributes(const map&att, unsigned&natt, - const Design*des, - NetScope*scope) + Design*des, NetScope*scope) { natt = att.size(); if (natt == 0) @@ -74,6 +73,9 @@ attrib_list_t* evaluate_attributes(const map&att, /* * $Log: eval_attrib.cc,v $ + * Revision 1.9 2007/06/04 19:14:06 steve + * Build errors in picky GCC compilers. + * * Revision 1.8 2005/11/27 17:01:57 steve * Fix for stubborn compiler. * diff --git a/util.h b/util.h index 1ae5eb37f..2654484e0 100644 --- a/util.h +++ b/util.h @@ -19,7 +19,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #ifdef HAVE_CVS_IDENT -#ident "$Id: util.h,v 1.8 2005/11/27 17:01:57 steve Exp $" +#ident "$Id: util.h,v 1.9 2007/06/04 19:14:06 steve Exp $" #endif # include @@ -46,11 +46,13 @@ struct attrib_list_t { extern attrib_list_t* evaluate_attributes(const map&att, unsigned&natt, - const Design*des, - NetScope*scope); + Design*des, NetScope*scope); /* * $Log: util.h,v $ + * Revision 1.9 2007/06/04 19:14:06 steve + * Build errors in picky GCC compilers. + * * Revision 1.8 2005/11/27 17:01:57 steve * Fix for stubborn compiler. *