https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93585
--- Comment #6 from Norman Goldstein <normvcr at telus dot net> --- 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.