https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111210
Xi Ruoyao <xry111 at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |xry111 at gcc dot gnu.org --- Comment #3 from Xi Ruoyao <xry111 at gcc dot gnu.org> --- (In reply to Shaohua Li from comment #2) > (In reply to Alexander Monakov from comment #1) > > 'c' is called with 'd' pointing to 'long e[2]', so > > > > return *(int *)(d + 1); > > > > is an aliasing violation (dereferencing a pointer to an incompatible type). > > Thanks for the quick diagnosis. I tried to enable -Wall -Wextra -pedantic > but got no warning about the test case. Could you share how you diagnose > this issue? The red banner in the bug creation page says clearly: "Similarly, if compiling with -fno-strict-aliasing -fwrapv makes a difference, your code probably is not correct."