https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119543
--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
here is an implementation like your original one which is well defined:
```
int isTmax(int x) {
unsigned temp = x;
temp = temp + 1; // do the addition in unsigned rather than signed to avoid
undefined behavior and get wrapping behavior rather than an overflow
int tmin = 1u << 31; /* 0x80000000 - Minimum two's complement value */
int t = temp ^ tmin;
int y = !t;
return y;
}
```
