On Sat, Feb 22, 2020 at 08:24:45PM +0100, Dimitry Andric wrote: > It might be better to define our own UNREACHABLE macro, similar to what > llvm itself does, roughly something like: > > __noreturn void internal_unreachable(const char *, const char *, int); > #define UNREACHABLE(msg) internal_unreachable(msg, __FILE__, __LINE__) > > And have the implementation of internal_unreachable() log the file, > line and message, then abort or panic in some appropriate way.
One way to deal with it is to use __builtin_trap() for debug builds and __builtin_unreachable() otherwise. They both signify code that shouldn't be reached, but they differ in how the compiler will use that knowledge. Joerg _______________________________________________ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"