Can anyone provide some code examples that act differently when compiled with -fwrapv vs without?
The gcc documentation says that -fwrapv instructs the compiler to assume that signed arithmetic overflow of addition, subtraction and multiplication wraps around using twos-complement representation.
But whenever I try overflowing the result is the same with or without -fwrapv.