https://bugs.llvm.org/show_bug.cgi?id=41259
Nikita Kniazev <nok.ra...@gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|REOPENED |RESOLVED
--- Comment #9 from Nikita Kniazev <nok.ra...@gmail.com> ---
> Probably I am missing something. There is a branch to a non-existing default
> case, until I explicitly place a `__builtin_unreachable()` in it. This does
> not happen for the switch with uses. https://godbolt.org/z/hH8geH
Ah, this is invalid. In case when function has the return type and does not
have return statement it is considered unreachable because of UB, and when the
return type is void it cannot assume that it is unreachable.
I am closing this since the fix was recommited in
https://reviews.llvm.org/rL358483.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs