This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: std::pow implementation
- From: Richard Guenther <rguenth at tat dot physik dot uni-tuebingen dot de>
- To: Robert Dewar <dewar at gnat dot com>
- Cc: aoliva at redhat dot com, <gdr at integrable-solutions dot net>, <gcc at gcc dot gnu dot org>, <s dot bosscher at student dot tudelft dot nl>
- Date: Wed, 30 Jul 2003 15:51:11 +0200 (CEST)
- Subject: 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.