https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104719

--- Comment #10 from Jonathan Wakely <redi at gcc dot gnu.org> ---
There is a downside to always_inline, which might be similar to the stack usage
problem mentioned in the llvm ticket. If a function grows too large, the
optimiser can just give up and stop inlining. But for always_inline that gives
a fatal error with no way to fix it. The attribute tells the compiler kitty
isn't allowed to give up, the call must *always* be inline. If we liberally
sprinkle it all over the std::lib and it results in compiler errors, users
can't do anything about it. The code won't compile, period. Annotations that
usually improve performance, but then sometimes give unavoidable errors are not
a good idea.

Reply via email to