You cannot detect signed int overflow. You have to write your code to avoid it.
Signed int overflow is Undefined Behaviour and if it is present in your program, the program is invalid and the compiler is not required to generate any specific behaviour.