This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: -fobey-inline (was Re: gcc and inlining)
On Mon, Mar 17, 2003 at 09:11:38PM +0100, Gabriel Dos Reis wrote:
> | I would be willing to accept as a compromise that such implicit inline
> | requests are somehow "weaker" than explicit use of the inline keyword.
>
> That would be a disaster on STL-like code where function-object's
> operator() are commonly defined in the enclosing class. I can't see
> any compeling reason why we should introduce that artificial distinction.
I'm not talking about making that any worse: by "weaker", I meant,
essentially, to handle inlining the way it is currently handled for such
cases, where inline is considered less mandatory than it was in the past,
while the keyword would mean "inline it if at all possible".
However, my preference would be just to inline all that the language
suggests will be inlined. If this causes code size bloat and icache
saturation, the user has the available means to correct this (move
function definitions out-of-line).