From: Xiretza Date: Thu, 7 May 2020 09:44:38 +0000 (+0200) Subject: Reorder cases to avoid fall-through warning X-Git-Tag: working-ls180~563^2 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d86fc791f9016fa6dafa7af1758ef301136e9eec;p=yosys.git Reorder cases to avoid fall-through warning log_assert(false) never returns and thus can't fall through, but gcc doesn't seem to think that far. Making it the last case avoids the problem entirely. --- diff --git a/backends/cxxrtl/cxxrtl.cc b/backends/cxxrtl/cxxrtl.cc index 133f56663..f3ed3f623 100644 --- a/backends/cxxrtl/cxxrtl.cc +++ b/backends/cxxrtl/cxxrtl.cc @@ -1943,13 +1943,13 @@ struct CxxrtlWorker { case RTLIL::STa: break; + case RTLIL::STg: + log_cmd_error("Global clock is not supported.\n"); + // Handling of init-type sync rules is delegated to the `proc_init` pass, so we can use the wire // attribute regardless of input. case RTLIL::STi: log_assert(false); - - case RTLIL::STg: - log_cmd_error("Global clock is not supported.\n"); } }