https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118005
--- Comment #10 from Alejandro Colomar <alx at kernel dot org> --- (In reply to Sam James from comment #9) > If they're internals, building the library with LTO and correct visibility > annotations should handle that for you if you mean "I want inlining > internally, but not for consumers". I prefer inline over LTO. inline gives extra information to static analyzers, which gives me more confidence in the correctness of the code. LTO only gives optimization, while I consider inline most important due to the diagnostics, and only secondarily as an optimization feature. Yeah, -fanalyzer might be able to warn about some things when combined with LTO, but that's much less powerful than compile-time analyzers with inline functions. And yes, I'm using visibility attributes as appropriate.