https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93585
Eric Gallager <egallager at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |egallager at gcc dot gnu.org --- Comment #7 from Eric Gallager <egallager at gcc dot gnu.org> --- (In reply to Norman Goldstein from comment #6) > Thank you for that. I hadn't realized there was a -flto flag. It, indeed, > does warn for the mismatched types. The flag also causes the notice > > note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used > > Perhaps an oversight, the above notice is emitted even when I do include the > no-strict-aliasing flag: > > gcc -fno-strict-aliasing -o tlink tlink.cpp tlink2.cpp -flto -lstdc++ > > I really like the -flto option. Mismatched types could be otherwise hard to > track down. That's bug 80379