https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69104
Martin Sebor <msebor at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever confirmed|0 |1 Known to fail| |4.9.3, 5.1.0, 6.0 --- Comment #5 from Martin Sebor <msebor at gcc dot gnu.org> --- Thanks for looking into it! (I've changed the Status to NEW since you confirmed the absence of the warning.) After some searching and reading it seems like there are a couple of problems then: 1) the known system header/preprocessor bug is preventing the GCC from issuing the warning (it's enabled by default and doesn't require -Wall or -Wextra) 2) the -Winvalid-memory-model option that controls the warning is undocumented in the GCC manual Let me submit a patch for (2). Based on discussions in Bugzilla, fixing (1) sounds like it will be a tougher nut to crack. (I wonder how many other problems this bug masks.)