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, Jul 30, 2003 at 11:06:44AM -0400, Scott Robert Ladd wrote:
> Gabriel Dos Reis wrote:
> > Let's the programmer decide.  It is *his* choice.  He has control do
> > decide. 
> 
> I'm with Gabriel on this one. I've been doing C++ since it was "C with 
> Classes," and it has always been clear to me that Stroustrup trusts the 
> programmer over the compiler.

I agree, as a rule, that we should trust the programmer over the compiler
with regard to the "inline" keyword.

However, that doesn't get around the fact that we have an -O3 switch,
enabling a mode where the compiler has to make decisions to inline
additional functions.

In such cases, the compiler cannot ignore the effect of constant arguments
causing much of the code in a called function to disappear when the called
function is inlined.


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