On Thu, 1 Mar 2018, Martin Sebor wrote:

> While testing my recent changes to the handling of attributes
> on C++ templates I noticed that the -finline-limit=N option
> is not recognized in attribute or pragma optimize.  In response
> to the bug I raised, Richard you said the option is deprecated,
> so I went ahead and documented the deprecation in the manual
> and also added a deprecation warning.  I also added it to
> Optimization options.  The attached patch reflects these
> changes.
> I also tried to put together a test to verify that the option
> works as expected, both in attributes and in pragmas.  I wasn't
> able to get it to work reliably or sensibly.
> In C, #pragma optimize ("inline-limit=1") has a global effect
> on all functions in the file, even those lexically before the
> pragma.  In C++, the pragma has no effect.  Both of these
> effects are contrary to my reading of the manual.
> Attribute optimize ("inline-limit") behaves similarly, which
> seems even more unexpected and even more contrary to the manual
> which by referring to Function Specific Option Pragmas suggests
> that both the pragma and especially the attribute apply
> optimizations to just the functions they're specified for.

It can't really work so please do _not_ add the option to
the set of Optimize options.  Inlining is an IPA task so
"per function" parameters do not make sense at all.

IMHO the bug is simply INVALID.


Reply via email to