When compiling with -Winline -O[2,3,s], I frequently get errors like: mistream.h:196: warning: called from here mistream.h:174: warning: inlining failed in call to 'bool ustl::istream::aligned(size_t) const': --param large-function-growth limit reached This is understandable, since I use a lot of inlining and inevitably run over this limit or one of the others. Explicitly increasing the --param value solves the problem. However, it bothers me that the compiler requires special flags to inline functions that I have already explicitly declared as inline. When I use the inline keyword in a declaration, I expect the compiler to inline it no matter what, with debug builds being the only exception. So can the optimizer automatically adjust inlining parameters and inline everything I tell it to inline? I suppose it might be a bit of work, since explicit parameter limits should still be honored.
inline is always been just a hint to the compiler, sorry, this is how the standard is worded (or very close). For 4.1.0, we should have optimization before inlining and should be better at estimating the size of the function. The params are there so we can tune GCC, if you instead supply a testcase to a new bug where we don't inline fully, that would be better than changing how this works.