Fix OSX compile issue with -Winvalid-noreturn, bug1440.

This commit is contained in:
Wilson Snyder 2019-05-14 20:51:28 -04:00
parent 6ef7d5f0fd
commit 8ad1a68420
3 changed files with 8 additions and 4 deletions

View File

@ -1067,7 +1067,9 @@ void AstNode::dumpTreeFile(const string& filename, bool append, bool doDump) {
editCountSetLast(); 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 { void AstNode::v3errorEnd(std::ostringstream& str) const {
if (!m_fileline) { if (!m_fileline) {

View File

@ -172,6 +172,8 @@ private:
}; };
std::ostream& operator<<(std::ostream& os, FileLine* fileline); 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

View File

@ -147,7 +147,7 @@ void V3GraphVertex::v3errorEnd(std::ostringstream& str) const {
} }
} }
void V3GraphVertex::v3errorEndFatal(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) { std::ostream& operator<<(std::ostream& os, V3GraphVertex* vertexp) {