[Bug lto/83954] [6/7/8 Regression] LTO: Bogus -Wlto-type-mismatch warning for array of pointer to incomplete type
dobonachea at lbl dot gov
gcc-bugzilla@gcc.gnu.org
Mon Jan 22 15:01:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83954
--- Comment #5 from Dan Bonachea <dobonachea at lbl dot gov> ---
(In reply to Martin Liška from comment #4)
> > Assuming it's the latter, can anyone suggest any non-intrusive workarounds?
> > (aside from the obvious "big hammers" of -fno-lto or -fno-strict-aliasing)
>
> Yes, the warning should not produce bogus warnings. Proper solution is not
> to break strict aliasing. Note that it can help optimization to make more
> aggressive optimizations.
I'm confused - are you saying the test program actually breaks C's strict
aliasing rules? My understanding was this is a correct (spec-compliant) C
program that is being mishandled by gcc. My question was whether this
mishandling could generally result in actual incorrect optimization of programs
encountering this defect, and it sounds like you are saying it might?
More information about the Gcc-bugs
mailing list