From 41035190f0bb3777daee8482f3a45f99bb9c371e Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Fri, 13 Aug 2004 17:39:32 +0000 Subject: Add patches to quiet new warnings and errors from gcc 3.4.2. The patches have been fed upstream to the maintainer and will hopefully be included in future releases. Prodded by: pointyhat via kris --- math/libmath++/files/patch-math-matcher.tcc | 44 ++++ math/libmath++/files/patch-math-nodes.h | 11 + math/libmath++/files/patch-math-nodes.tcc | 379 ++++++++++++++++++++++++++++ 3 files changed, 434 insertions(+) create mode 100644 math/libmath++/files/patch-math-matcher.tcc create mode 100644 math/libmath++/files/patch-math-nodes.h create mode 100644 math/libmath++/files/patch-math-nodes.tcc (limited to 'math/libmath++') diff --git a/math/libmath++/files/patch-math-matcher.tcc b/math/libmath++/files/patch-math-matcher.tcc new file mode 100644 index 000000000000..eca72518a8a3 --- /dev/null +++ b/math/libmath++/files/patch-math-matcher.tcc @@ -0,0 +1,44 @@ +--- math++/matcher.tcc.orig Fri Aug 13 13:11:35 2004 ++++ math++/matcher.tcc Fri Aug 13 13:15:44 2004 +@@ -35,12 +35,12 @@ + + template + TMatchRegistry::TMatchRegistry() { +-}; ++} + + template + TMatchRegistry::TMatchRegistry(const TMatchRegistry& AProto) : + FAnyMap(AProto.FAnyMap), FNodeList(AProto.FNodeList) { +-}; ++} + + template + void TMatchRegistry::define(const std::string& AId, const TNode *ANode) { +@@ -158,7 +158,7 @@ + va_start(ap, ARight); + + while (TMatch *p = va_arg(ap, TMatch *)) +- FPatterns.push_back(p); ++ this->FPatterns.push_back(p); + + va_end(ap); + } +@@ -166,7 +166,7 @@ + template + bool TPlusMatch::match(const TNode *AExpr, TMatchRegistry *AReg) const { + // yet a primitive sequencial search +- for (typename T2Match::TList::const_iterator p = FPatterns.begin(); p != FPatterns.end(); ++p) ++ for (typename T2Match::TList::const_iterator p = this->FPatterns.begin(); p != this->FPatterns.end(); ++p) + if (!TMatcher::match(*p, AExpr, AReg)) + return false; + +@@ -182,7 +182,7 @@ + va_start(ap, ARight); + + while (TMatch *p = va_arg(ap, TMatch *)) +- FPatterns.push_back(p); ++ this->FPatterns.push_back(p); + + va_end(ap); + } diff --git a/math/libmath++/files/patch-math-nodes.h b/math/libmath++/files/patch-math-nodes.h new file mode 100644 index 000000000000..638e6df4314b --- /dev/null +++ b/math/libmath++/files/patch-math-nodes.h @@ -0,0 +1,11 @@ +--- math++/nodes.h.orig Fri Aug 13 12:59:11 2004 ++++ math++/nodes.h Fri Aug 13 12:59:31 2004 +@@ -130,7 +130,7 @@ + TNode *get() const { return FCurrent; } + + TNodeIterator& operator++() { increment(); return *this; } +- TNodeIterator& operator--() { declrement(); return *this; } ++ TNodeIterator& operator--() { decrement(); return *this; } + }; + + template diff --git a/math/libmath++/files/patch-math-nodes.tcc b/math/libmath++/files/patch-math-nodes.tcc new file mode 100644 index 000000000000..51fa6df07e31 --- /dev/null +++ b/math/libmath++/files/patch-math-nodes.tcc @@ -0,0 +1,379 @@ +--- math++/nodes.tcc.orig Fri Aug 13 13:01:46 2004 ++++ math++/nodes.tcc Fri Aug 13 13:10:49 2004 +@@ -92,7 +92,7 @@ + // TNumberNode + template + TNumberNode::TNumberNode(const T& ANumber) : +- TNode(NUMBER_NODE, 0), FNumber(ANumber) { ++ TNode(TNode::NUMBER_NODE, 0), FNumber(ANumber) { + } + + template +@@ -112,14 +112,14 @@ + + template + bool TNumberNode::equals(const TNode *ANode) const { +- return this && ANode && ANode->nodeType() == NUMBER_NODE ++ return this && ANode && ANode->nodeType() == TNode::NUMBER_NODE + && FNumber == static_cast *>(ANode)->FNumber; + } + + // TSymbolNode + template + TSymbolNode::TSymbolNode(const std::string& ASymbol) : +- TNode(SYMBOL_NODE, 0), FSymbol(ASymbol) { ++ TNode(TNode::SYMBOL_NODE, 0), FSymbol(ASymbol) { + } + + template +@@ -139,14 +139,14 @@ + + template + bool TSymbolNode::equals(const TNode *ANode) const { +- return this && ANode && ANode->nodeType() == SYMBOL_NODE ++ return this && ANode && ANode->nodeType() == TNode::SYMBOL_NODE + && FSymbol == static_cast *>(ANode)->FSymbol; + } + + // TParamNode + template + TParamNode::TParamNode() : +- TNode(PARAM_NODE, 0) { ++ TNode(TNode::PARAM_NODE, 0) { + } + + template +@@ -161,7 +161,7 @@ + + template + bool TParamNode::equals(const TNode *ANode) const { +- return this && ANode && ANode->nodeType() == PARAM_NODE; ++ return this && ANode && ANode->nodeType() == TNode::PARAM_NODE; + } + + // TUnaryNodeOp +@@ -186,7 +186,7 @@ + bool TUnaryNodeOp::equals(const TNode *ANode) const { + // this method does not make use of the left() for performance reasons + +- return this && ANode && nodeType() == ANode->nodeType() && ++ return this && ANode && this->nodeType() == ANode->nodeType() && + FNode->equals(static_cast *>(ANode)->FNode.get()); + } + +@@ -215,7 +215,7 @@ + // this method does not make use of the left() and right() methods + // for performance reasons + +- return this && ANode && nodeType() == ANode->nodeType() && ++ return this && ANode && this->nodeType() == ANode->nodeType() && + FLeft->equals(static_cast *>(ANode)->FLeft.get()) && + FRight->equals(static_cast *>(ANode)->FRight.get()); + } +@@ -223,7 +223,7 @@ + // TPlusNode + template + TPlusNode::TPlusNode(TNode *ALeft, TNode *ARight) : +- TBinaryNodeOp(PLUS_NODE, -5, ALeft, ARight) { ++ TBinaryNodeOp(TNode::PLUS_NODE, -5, ALeft, ARight) { + } + + template +@@ -233,13 +233,13 @@ + + template + TPlusNode *TPlusNode::clone() const { +- return new TPlusNode(left()->clone(), right()->clone()); ++ return new TPlusNode(this->left()->clone(), this->right()->clone()); + } + + // TNegNode + template + TNegNode::TNegNode(TNode *ANode) : +- TUnaryNodeOp(NEG_NODE, -5, ANode) { ++ TUnaryNodeOp(TNode::NEG_NODE, -5, ANode) { + } + + template +@@ -249,13 +249,13 @@ + + template + TNegNode *TNegNode::clone() const { +- return new TNegNode(node()->clone()); ++ return new TNegNode(this->node()->clone()); + } + + // TMulNode + template + TMulNode::TMulNode(TNode *ALeft, TNode *ARight) : +- TBinaryNodeOp(MUL_NODE, -3, ALeft, ARight) { ++ TBinaryNodeOp(TNode::MUL_NODE, -3, ALeft, ARight) { + } + + template +@@ -265,13 +265,13 @@ + + template + TMulNode *TMulNode::clone() const { +- return new TMulNode(left()->clone(), right()->clone()); ++ return new TMulNode(this->left()->clone(), this->right()->clone()); + } + + // TDivNode + template + TDivNode::TDivNode(TNode *ALeft, TNode *ARight) : +- TBinaryNodeOp(DIV_NODE, -3, ALeft, ARight) { ++ TBinaryNodeOp(TNode::DIV_NODE, -3, ALeft, ARight) { + } + + template +@@ -281,13 +281,13 @@ + + template + TDivNode *TDivNode::clone() const { +- return new TDivNode(left()->clone(), right()->clone()); ++ return new TDivNode(this->left()->clone(), this->right()->clone()); + } + + // TPowNode + template + TPowNode::TPowNode(TNode *ALeft, TNode *ARight) : +- TBinaryNodeOp(POW_NODE, -1, ALeft, ARight) { ++ TBinaryNodeOp(TNode::POW_NODE, -1, ALeft, ARight) { + } + + template +@@ -297,13 +297,13 @@ + + template + TPowNode *TPowNode::clone() const { +- return new TPowNode(left()->clone(), right()->clone()); ++ return new TPowNode(this->left()->clone(), this->right()->clone()); + } + + // TSqrtNode + template + TSqrtNode::TSqrtNode(TNode *ANode) : +- TUnaryNodeOp(SQRT_NODE, -1, ANode) { ++ TUnaryNodeOp(TNode::SQRT_NODE, -1, ANode) { + } + + template +@@ -313,13 +313,13 @@ + + template + TSqrtNode *TSqrtNode::clone() const { +- return new TSqrtNode(node()->clone()); ++ return new TSqrtNode(this->node()->clone()); + } + + // TSinNode + template + TSinNode::TSinNode(TNode *ANode) : +- TUnaryNodeOp(SIN_NODE, -1, ANode) { ++ TUnaryNodeOp(TNode::SIN_NODE, -1, ANode) { + } + + template +@@ -329,13 +329,13 @@ + + template + TSinNode *TSinNode::clone() const { +- return new TSinNode(node()->clone()); ++ return new TSinNode(this->node()->clone()); + } + + // TCosNode + template + TCosNode::TCosNode(TNode *ANode) : +- TUnaryNodeOp(COS_NODE, -1, ANode) { ++ TUnaryNodeOp(TNode::COS_NODE, -1, ANode) { + } + + template +@@ -345,13 +345,13 @@ + + template + TCosNode *TCosNode::clone() const { +- return new TCosNode(node()->clone()); ++ return new TCosNode(this->node()->clone()); + } + + // TTanNode + template + TTanNode::TTanNode(TNode *ANode) : +- TUnaryNodeOp(TAN_NODE, -1, ANode) { ++ TUnaryNodeOp(TNode::TAN_NODE, -1, ANode) { + } + + template +@@ -361,7 +361,7 @@ + + template + TTanNode *TTanNode::clone() const { +- return new TTanNode(node()->clone()); ++ return new TTanNode(this->node()->clone()); + } + + // TCoTanNode +@@ -373,7 +373,7 @@ + // TLnNode + template + TLnNode::TLnNode(TNode *ANode) : +- TUnaryNodeOp(LN_NODE, -1, ANode) { ++ TUnaryNodeOp(TNode::LN_NODE, -1, ANode) { + } + + template +@@ -383,13 +383,13 @@ + + template + TLnNode *TLnNode::clone() const { +- return new TLnNode(node()->clone()); ++ return new TLnNode(this->node()->clone()); + } + + // TFuncNode + template + TFuncNode::TFuncNode(const std::string& AName, TNode *AParam) : +- TUnaryNodeOp(FUNC_NODE, -1, AParam), FName(AName) { ++ TUnaryNodeOp(TNode::FUNC_NODE, -1, AParam), FName(AName) { + } + + template +@@ -404,13 +404,13 @@ + + template + TFuncNode *TFuncNode::clone() const { +- return new TFuncNode(FName, node()->clone()); ++ return new TFuncNode(FName, this->node()->clone()); + } + + // TIfNode + template + TIfNode::TIfNode(TNode *ACondNode, TNode *AThenNode, TNode *AElseNode) : +- TBinaryNodeOp(IF_NODE, -1, AThenNode, AElseNode), ++ TBinaryNodeOp(TNode::IF_NODE, -1, AThenNode, AElseNode), + FCondition(ACondNode) { + } + +@@ -421,12 +421,12 @@ + + template + TNode *TIfNode::trueExpr() const { +- return left(); ++ return this->left(); + } + + template + TNode *TIfNode::falseExpr() const { +- return right(); ++ return this->right(); + } + + template +@@ -436,13 +436,13 @@ + + template + TIfNode *TIfNode::clone() const { +- return new TIfNode(FCondition->clone(), left()->clone(), right()->clone()); ++ return new TIfNode(FCondition->clone(), this->left()->clone(), this->right()->clone()); + } + + // TEquNode + template + TEquNode::TEquNode(TNode *ALeft, TNode *ARight) : +- TBinaryNodeOp(EQU_NODE, -10, ALeft, ARight) { ++ TBinaryNodeOp(TNode::EQU_NODE, -10, ALeft, ARight) { + } + + template +@@ -452,13 +452,13 @@ + + template + TEquNode *TEquNode::clone() const { +- return new TEquNode(left()->clone(), right()->clone()); ++ return new TEquNode(this->left()->clone(), this->right()->clone()); + } + + // TUnEquNode + template + TUnEquNode::TUnEquNode(TNode *ALeft, TNode *ARight) : +- TBinaryNodeOp(UNEQU_NODE, -10, ALeft, ARight) { ++ TBinaryNodeOp(TNode::UNEQU_NODE, -10, ALeft, ARight) { + } + + template +@@ -468,13 +468,13 @@ + + template + TUnEquNode *TUnEquNode::clone() const { +- return new TUnEquNode(left()->clone(), right()->clone()); ++ return new TUnEquNode(this->left()->clone(), this->right()->clone()); + } + + // TGreaterNode + template + TGreaterNode::TGreaterNode(TNode *ALeft, TNode *ARight) : +- TBinaryNodeOp(GREATER_NODE, -10, ALeft, ARight) { ++ TBinaryNodeOp(TNode::GREATER_NODE, -10, ALeft, ARight) { + } + + template +@@ -484,13 +484,13 @@ + + template + TGreaterNode *TGreaterNode::clone() const { +- return new TGreaterNode(left()->clone(), right()->clone()); ++ return new TGreaterNode(this->left()->clone(), this->right()->clone()); + } + + // TLessNode + template + TLessNode::TLessNode(TNode *ALeft, TNode *ARight) : +- TBinaryNodeOp(LESS_NODE, -10, ALeft, ARight) { ++ TBinaryNodeOp(TNode::LESS_NODE, -10, ALeft, ARight) { + } + + template +@@ -500,13 +500,13 @@ + + template + TLessNode *TLessNode::clone() const { +- return new TLessNode(left()->clone(), right()->clone()); ++ return new TLessNode(this->left()->clone(), this->right()->clone()); + } + + // TGreaterEquNode + template + TGreaterEquNode::TGreaterEquNode(TNode *ALeft, TNode *ARight) : +- TBinaryNodeOp(GREATER_EQU_NODE, -10, ALeft, ARight) { ++ TBinaryNodeOp(TNode::GREATER_EQU_NODE, -10, ALeft, ARight) { + } + + template +@@ -516,13 +516,13 @@ + + template + TGreaterEquNode *TGreaterEquNode::clone() const { +- return new TGreaterEquNode(left()->clone(), right()->clone()); ++ return new TGreaterEquNode(this->left()->clone(), this->right()->clone()); + } + + // TLessEquNode + template + TLessEquNode::TLessEquNode(TNode *ALeft, TNode *ARight) : +- TBinaryNodeOp(LESS_EQU_NODE, -10, ALeft, ARight) { ++ TBinaryNodeOp(TNode::LESS_EQU_NODE, -10, ALeft, ARight) { + } + + template +@@ -532,7 +532,7 @@ + + template + TLessEquNode *TLessEquNode::clone() const { +- return new TLessEquNode(left()->clone(), right()->clone()); ++ return new TLessEquNode(this->left()->clone(), this->right()->clone()); + } + + } // namespace math -- cgit v1.2.3