Open nickhutchinson opened 11 months ago
Reproducible with Boost 1.82 and both Clang 16 and VS 2022.
#include <boost/asio/coroutine.hpp> #include <iostream> struct C : boost::asio::coroutine { void operator()() { BOOST_ASIO_CORO_REENTER(*this) { BOOST_ASIO_CORO_YIELD std::cerr << 1 << std::endl; BOOST_ASIO_CORO_YIELD std::cerr << 3 << std::endl; BOOST_ASIO_CORO_YIELD std::cerr << 2 << std::endl; } } };
Build with -std=c++17 -Wimplicit-fallthrough with Clang:
-std=c++17 -Wimplicit-fallthrough
https://godbolt.org/z/1vjPqWbcj
<source>:7:5: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough] BOOST_ASIO_CORO_REENTER(*this) { ...
Build with /std:c++17 and warning C5262 enabled with MSVC:
/std:c++17
https://godbolt.org/z/e43aezad5
<source>(8): warning C5262: implicit fall-through occurs here; are you missing a break statement? Use [[fallthrough]] when a break statement is intentionally omitted between cases <source>(8): note: statement that may fall through is here ...
Reproducible with Boost 1.82 and both Clang 16 and VS 2022.
Build with
-std=c++17 -Wimplicit-fallthrough
with Clang:https://godbolt.org/z/1vjPqWbcj
Build with
/std:c++17
and warning C5262 enabled with MSVC:https://godbolt.org/z/e43aezad5