On Tue, Dec 10, 2013 at 5:55 PM, Francisco Jerez <curroje...@riseup.net> wrote: > It just seems annoying and unnecessary to me to have to repeat the same > pattern before each use of unreachable(). If by definition the > unreachable macro wants to be accompanied with an assert, why don't we > save ourselves pain by having unreachable take care of both things you > mentioned? > >> I don't particularly like the idea of modifying unreachable to take a >> string to print. > > There's some precedent for this, see for example LLVM's unreachable > macro [1]. It turns out that it does roughly what my proposed patch > does: print an error message and abort on debug builds and call > __builtin_unreachable() on release builds. > > [1] > http://llvm.org/svn/llvm-project/llvm/trunk/include/llvm/Support/ErrorHandling.h
Yeah, okay. I just looked through the kernel and didn't find any uses of unreachable() combined with assert() or similar. So what you suggest seems fine to me. _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev