philnik777 wrote: > `unreachable` is morally similar to `offsetof` in that it's a macro interface > where the implementation can give better results by expanding to a builtin > than a library is likely to be able to give via a naive implementation, but > the interfaces _can_ be provided by a CRT.
FWIW I don't think they are morally similar. `unreachable` could be implemented in very different ways. Consider a libc which tries to terminate on UB instead of letting the compiler optimize things away (e.g. a debug mode). Then the Clang implementation is not at all what the libc would do. https://github.com/llvm/llvm-project/pull/86748 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits