>>>> "Hrvoje" == Hrvoje Niksic
<hniksic(a)iskon.hr> writes:
Hrvoje> Martin Buchholz <martin(a)xemacs.org> writes:
Hrvoje> For instance, `gcc -O2' (or, for that matter, `gcc -O')
Hrvoje> doesn't inline any functions, but it does inline the ones
Hrvoje> specifically requested. `gcc -O3' inlines all it can, but
Hrvoje> was reported as buggy under some architectures.
>
> Whatever you do, `inline' will never be more than a hint to the
> compiler.
Hrvoje> Whatever. Gcc for one has respected that hint whenever I tried it.
There has recently been a flamewar on the gcc mailing list where Linus
got mad at the gcc people for no longer inlining functions that had
been inlined since the beginning of time. The gcc folks responded:
any code that _relies_ on inlining being performed is broken. They
reserve the right to not inline any function if they feel like it. So
recursive functions, alloca() calling functions, and some functions
dear to Linus' heart are not inlined. I think you'll also find that
if you try to inline a huge function, the compiler will politely
decline.
Martin