https://gcc.gnu.org/bugzilla/show_bug.cgi?id=26732
Harald van Dijk <harald at gigawatt dot nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |harald at gigawatt dot nl --- Comment #8 from Harald van Dijk <harald at gigawatt dot nl> --- (In reply to Eric Gallager from comment #7) > (In reply to Andrew Pinski from comment #6) > > Now we don't even error out at -O3. > > Why would the -O3 matter? -O3 enables inlining, which up until GCC 4.2 triggered an error on the parameter/argument type mismatch. But GCC is correct to not report an error for that. This is only undefined at runtime, so the compiler is required to allow this unless it can prove the execution will reach that point of the code. What's missing as of GCC 4.0 is GCC 3.4's default-enabled warning "warning: structure defined inside parms".