https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83703
--- Comment #4 from Freddie Chopin <freddie_chopin at op dot pl> --- Would it be possible to have a warning with -Wall -Wextra when something like that happens? I think this behaviour here is really strange and really unexpected. In "real" programs I guess there are tons of such tiny undefined behaviours so eliminating them is probably very hard, which would then render -O3 option completely useless.