From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25088 invoked by alias); 31 Jul 2003 13:37:16 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 25004 invoked from network); 31 Jul 2003 13:37:15 -0000 Received: from unknown (HELO uniton.integrable-solutions.net) (62.212.99.186) by sources.redhat.com with SMTP; 31 Jul 2003 13:37:15 -0000 Received: from uniton.integrable-solutions.net (localhost [127.0.0.1]) by uniton.integrable-solutions.net (8.12.3/8.12.3/SuSE Linux 0.6) with ESMTP id h6VDaoSu029507; Thu, 31 Jul 2003 15:36:50 +0200 Received: (from gdr@localhost) by uniton.integrable-solutions.net (8.12.3/8.12.3/Submit) id h6VDao7m029506; Thu, 31 Jul 2003 15:36:50 +0200 X-Authentication-Warning: uniton.integrable-solutions.net: gdr set sender to gdr@integrable-solutions.net using -f To: Scott Robert Ladd Cc: Rob Taylor , "Gcc@Gcc. Gnu. Org" Subject: Re: std::pow implementation References: <041f01c3574f$f51e9180$b800a8c0@eventhorizon> <3F29159B.8060609@coyotegulch.com> From: Gabriel Dos Reis In-Reply-To: <3F29159B.8060609@coyotegulch.com> Organization: Integrable Solutions Date: Thu, 31 Jul 2003 14:44:00 -0000 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2003-07/txt/msg02310.txt.bz2 Scott Robert Ladd writes: | Rob Taylor wrote: | > 2) every function has to be maybe-inlinable for good optimisation, but the | > inline keyword gives good hinting and should be used. | | That's close to my position on the matter. | | 1) The compiler should be able to determine which functions it can | effectively inline for a given circumstance. | | 2) The compiler should respect "inline" directives from the | programmer, generating inline code when it is specified, unless doing | so is technically impossible or blatantly inefficient. | | 3) If the compiler rejects an "inline" request, it should clearly | state why it did so. After all, if the compiler is smart enough to | second-guess me, it should also be able to explain itself. ;) | | Such an approach gives the compiler maximum flexibility while | respecting the choices of the programmer. that is close to A function declaration (8.3.5, 9.3, 11.4) with an inline specifier declares an inline function. The inline specifier indicates to the implementation that *inline substitution* of the function body at the point of call *is to be preferred* to the usual function call mechanism. An implementation is not required to perform this inline substitution at the point of call; -- Gaby