std::pow implementation

Richard Guenther rguenth@tat.physik.uni-tuebingen.de
Wed Jul 30 14:02:00 GMT 2003


On Wed, 30 Jul 2003, Robert Dewar wrote:

> >
> > Therefore, inline the way you describe it, is useful only for
> > functions that are *always* profitable to inline.  Any function that
> > might or might not be profitable to inline should not be declared
> > inline, and the compiler would never inline it.
>
> And of course this approach is impractical, since whether inlining helps
> in a specific case is target dependent.

This discussion is all about the semantics of the inline keyword. But as
inline is a keyword defined by the standard without giving it strict
semantics it is quite useless. So for portability we are forced to keep
loose semantics. We can always provide the user with extensions with more
useful/strict semantics if he needs - and he does.

Richard.



More information about the Gcc mailing list