V3Ast.cpp gives warning with -Winvalid-noreturn #1440
Labels
area: configure/compiling
Issue involves configuring or compilating Verilator itself
resolution: fixed
Closed; fixed
Author Name: Kevin Kiningham (@kkiningh)
Original Redmine Issue: 1440 from https://www.veripool.org
Compiling src/V3Ast.cpp produces the following warning when compiled with -Winvalid-noreturn (Apple LLVM version 10.0.0)
This is fixed pretty easily by adding VL_UNREACHABLE after the assert (patch attached). I'm not 100% sure that's the correct solution though, since assert may return if compiled with NDEBUG defined. Would it be better to turn the assert(0) into an abort()?
The text was updated successfully, but these errors were encountered: