https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70611
--- Comment #4 from Manuel López-Ibáñez <manu at gcc dot gnu.org> --- (In reply to Andrew Pinski from comment #3) > There is no internals of GCC here. Rather the user specified all warnings > at link time. If the user did not want that then they did not need to > supply those options ... That is very user-unfriendly and another reason why people might just rationally decide that LTO is still not worth the pain. If I understand correctly, the non-LTO compilation works without warning. Adding -flto to your CFLAGS should not make your compilation fail in unexplained ways unless your code is wrong. If LTO is not meant to handle (some) warnings, then it should disable warnings internally (which would speed-up compilation). GCC, not the user, should know which warnings work with LTO and which ones don't, and ignore/disable them.