https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52119
Martin Sebor <msebor at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |msebor at gcc dot gnu.org Resolution|--- |FIXED --- Comment #15 from Martin Sebor <msebor at gcc dot gnu.org> --- Recent versions of G++ diagnose shifting into the sign bit (and reject it in constexpr contexts) so this looks resolved: warning: result of β(2 << 31)β requires 34 bits to represent, but βintβ only has 32 bits [-Wshift-overflow=] int n = 2 << 31; ~~^~~~~