On 10 May 2011 16:42, Ian Lance Taylor <iant@xxxxxxxxxx> wrote: > As of gcc 4.5 you can do this using __builtin_unreachable. Thanks, this is what I was looking for! > Use this with care. ÂIf you get it wrong, the results will be wholly > unpredictable. I guess enough care could be archived using an assert like in: #ifdef NDEBUG #define optimization_assert(cond) do { if (!(cond)) __builtin_unreachable(); } while (0); #else #define optimization_assert(cond) assert(cond) #endif