From 22249187304e59e17636d8eb7a7949bf92e20a4e Mon Sep 17 00:00:00 2001 From: Wilson Snyder Date: Mon, 26 Jan 2009 07:57:59 -0500 Subject: [PATCH] Fix error messages to consistently go to stderr. --- Changes | 2 ++ src/V3Broken.cpp | 6 +++--- src/V3Gate.cpp | 2 +- src/V3Graph.cpp | 2 +- src/V3Order.cpp | 4 ++-- src/V3Param.cpp | 2 +- 6 files changed, 10 insertions(+), 8 deletions(-) diff --git a/Changes b/Changes index 99d269fa5..6d91164dc 100644 --- a/Changes +++ b/Changes @@ -11,6 +11,8 @@ indicates the contributor was also the author of the fix; Thanks! **** Fix VL_RANDom to better randomize bits. [Art Stamness] +**** Fix error messages to consistently go to stderr. [Jeremy Bennett] + * Verilator 3.700 2009/01/08 ** Add limited support for tristate inouts. Written by Lane Brooks, diff --git a/src/V3Broken.cpp b/src/V3Broken.cpp index a784c8dc7..cc4ef3734 100644 --- a/src/V3Broken.cpp +++ b/src/V3Broken.cpp @@ -129,9 +129,9 @@ public: // Use only AstNode::dump instead of the virtual one, as there // may be varp() and other cross links that are bad. if (debug()) { - cout<<"%Error: LeakedNode"<<(it->first->backp()?"Back: ":": "); - ((AstNode*)(it->first))->AstNode::dump(cout); - cout<first->backp()?"Back: ":": "); + ((AstNode*)(it->first))->AstNode::dump(cerr); + cerr<second |= FLAG_LEAKED; diff --git a/src/V3Gate.cpp b/src/V3Gate.cpp index 9288a7e5c..4dca25744 100644 --- a/src/V3Gate.cpp +++ b/src/V3Gate.cpp @@ -582,7 +582,7 @@ void GateVisitor::replaceAssigns() { //if (debug()>9) {vscp->dumpTree(cout, "-vscDone: "); cout<valuep()->castNodeMath() || vscp->valuep()->nextp()) { - vscp->dumpTree(cout, "vscStrange: "); + vscp->dumpTree(cerr, "vscStrange: "); vscp->v3fatalSrc("Value of varscope not mathematical\n"); } } diff --git a/src/V3Graph.cpp b/src/V3Graph.cpp index 14718a522..32192eaf8 100644 --- a/src/V3Graph.cpp +++ b/src/V3Graph.cpp @@ -228,7 +228,7 @@ void V3Graph::clearColors() { void V3Graph::loopsVertexCb(V3GraphVertex* vertexp) { // Needed here as V3GraphVertex<< isn't defined until later in header - cout<<"-Info-Loop: "<<(void*)(vertexp)<<" "<(vertexp)) { - cout<nodep()->fileline()<<" "<nodep()->typeName()<nodep()->fileline()<<" "<nodep()->typeName()<(vertexp)) { - cout<varScp()->fileline()<<" "<varScp()->prettyName()<varScp()->fileline()<<" "<varScp()->prettyName()<modp()) { nodep->dumpTree(cout,"error:"); nodep->v3fatalSrc("Not linked?"); } + if (!nodep->modp()) { nodep->dumpTree(cerr,"error:"); nodep->v3fatalSrc("Not linked?"); } if (nodep->paramsp()) { UINFO(4,"De-parameterize: "<