https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110437
--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> --- (In reply to Jan Žižka from comment #3) > Good thanks for pointer and clarification. > > Is there some reason this cannot be caught during compile time already? I > mean the warning should be an error maybe? It would be much easier to fix in > legacy code. Well it is undefined behavior at runtime (not at compile time) so rejecting it would not be a valid thing to do.