Background
By default signed overflow is undefined behaviour.
My understanding of gcc (based on https://gcc.gnu.org/onlinedocs/gcc/Code-Gen-Options.html and What does -fwrapv do?) was that using -fwrapv made gcc treat signed overflow as being well defined behaviour.
However, comments on another question seem to say that signed overflow is still undefined behaviour even when this flag is on.
Question
Is signed overflow well defined in gcc with -fwrapv? If not, then what is the purpose of -fwrapv?