REQUIRE(co_await expr)
unexpectedly repeats execution in GCC
#2925
Labels
REQUIRE(co_await expr)
unexpectedly repeats execution in GCC
#2925
Describe the bug
REQUIRE(co_await expr)
unexpectedly repeats execution in GCC.Expected behavior
The co_await expression should only be executed once
Reproduction steps
https://godbolt.org/z/h6jshrYs8
Platform information:
Additional context
In GCC,
__builtin_constant_p(co_await expr)
is executed unexpectedly.while ((void) 0, (false) && static_cast<const bool &>(!!(co_await expr)))
is also.I believe this is a compiler bug, but is there a way to avoid it with
catch
?The text was updated successfully, but these errors were encountered: