This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: std::pow implementation


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]