News for hackers. Stuff that matters.
Re:Hand-Coded Assembly Beats Intrinsics in Speed and Simplicity by njohnson41 on Tuesday August 11, 2015 @05:50PM (#10044642)
You can convey some of that information to the compiler by using __builtin_unreachable(), e.g.:

  #define ASSUME(x) if(!(x))__builtin_unreachable()
This is compiler-specific, of course, and introduces undefined behavior if the assumption is violated. There's also no guarantee that the compiler will use the information well. But, it's almost guaranteed to not generate any extra code based on it.

There are no comments on this comment yet.