From 8ad1a68420a6ca38c9c44aaa01abb3ab1fa0303a Mon Sep 17 00:00:00 2001 From: Wilson Snyder Date: Tue, 14 May 2019 20:51:28 -0400 Subject: [PATCH] Fix OSX compile issue with -Winvalid-noreturn, bug1440. --- src/V3Ast.cpp | 4 +++- src/V3FileLine.h | 6 ++++-- src/V3Graph.cpp | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/V3Ast.cpp b/src/V3Ast.cpp index 0a0da2598..3100e128e 100644 --- a/src/V3Ast.cpp +++ b/src/V3Ast.cpp @@ -1067,7 +1067,9 @@ void AstNode::dumpTreeFile(const string& filename, bool append, bool doDump) { editCountSetLast(); } -void AstNode::v3errorEndFatal(std::ostringstream& str) const { v3errorEnd(str); assert(0); } +void AstNode::v3errorEndFatal(std::ostringstream& str) const { + v3errorEnd(str); assert(0); VL_UNREACHABLE +} void AstNode::v3errorEnd(std::ostringstream& str) const { if (!m_fileline) { diff --git a/src/V3FileLine.h b/src/V3FileLine.h index 3af449b3d..e52dc5b4c 100644 --- a/src/V3FileLine.h +++ b/src/V3FileLine.h @@ -172,6 +172,8 @@ private: }; std::ostream& operator<<(std::ostream& os, FileLine* fileline); -inline void FileLine::v3errorEndFatal(std::ostringstream& str) { v3errorEnd(str); assert(0); } +inline void FileLine::v3errorEndFatal(std::ostringstream& str) { + v3errorEnd(str); assert(0); VL_UNREACHABLE +} -#endif // Guard +#endif // Guard diff --git a/src/V3Graph.cpp b/src/V3Graph.cpp index 0bd00dde8..0322285c0 100644 --- a/src/V3Graph.cpp +++ b/src/V3Graph.cpp @@ -147,7 +147,7 @@ void V3GraphVertex::v3errorEnd(std::ostringstream& str) const { } } void V3GraphVertex::v3errorEndFatal(std::ostringstream& str) const { - v3errorEnd(str); assert(0); + v3errorEnd(str); assert(0); VL_UNREACHABLE } std::ostream& operator<<(std::ostream& os, V3GraphVertex* vertexp) {