https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70611
Manuel López-Ibáñez <manu at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Last reconfirmed| |2016-05-01 CC| |manu at gcc dot gnu.org Resolution|INVALID |--- Ever confirmed|0 |1 --- Comment #2 from Manuel López-Ibáñez <manu at gcc dot gnu.org> --- (In reply to Andrew Pinski from comment #1) > If you are going to be using lto you need to disable warnings as some > warnings don't happen until end of compiling. stack usage is one of these > warnings. How can a user know which warnings are those? GCC should disable on its own those warnings that cannot be handled by LTO (or emit a clear error that the warning is not valid with LTO). Same with invalid optimization options and attributes. If LTO is ever going to be usable by anyone who is not a GCC developer, it needs to be usable without knowing the internals of the compiler.