* Segher Boessenkool: > On Mon, Jul 14, 2025 at 03:03:46PM -0700, Florian Weimer wrote: >> * Segher Boessenkool: >> >> > -fwrapv is a great way to get slower code, too. Is there something in >> > your code that does not work without this reality-distorting flag? >> >> It really depends on the code. In many cases, -fwrapv enables >> additional optimizations. For example, it's much easier to use (in C >> code) the implicit sign bit many CPUs compute for free. > > -fwrapv says "I want something that is not valid C code". Code that > requires -fwrapv to work as intended is not valid C code (will have UB). It would be just another extension, and one that many compilers already enable by default. Even GCC makes casting from unsigned to int defined in all cases because doing that in a standard-conforming way is way too painful. Thanks, Florian