https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89408
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org --- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> --- One thing is optimization, which gcc is obviously able to constant fold this, the other is the C language, which requires a constant expression (language term) and this expression is not such a constant expression. So, it is not valid C (and not valid C++98, but valid C++11 and later).