https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108365
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Known to work|6.1.0, 6.4.0 | Known to fail| |6.1.0, 6.4.0 --- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> --- (In reply to Jakub Jelinek from comment #2) > It is UB on ilp32, but for lp64 it should be well defined. > Started with r9-1730-g9e392989053729d4d50 Then there is an older bug. For the following C++ code: constexpr char b = 1; long t = (short) ((long long) (unsigned long long) (-__INT_MAX__ - 1) / (long long) (b ? -1 : 0)); Should not produce any warnings but does, all the way back to GCC 6.1.0.