Comment

Comment by omoikane

The first example should have changed the heading to "C++ code" as opposed to "C code" due to the use of `std::unreachable()`. This matches the godbolt link.

Another alternative is to use `__builtin_unreachable()` (not standard, but available in GCC and Clang).

parent omoikane 6 days ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton