From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14987 invoked by alias); 30 Jul 2003 04:56:36 -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 14980 invoked from network); 30 Jul 2003 04:56:35 -0000 Received: from unknown (HELO uniton.integrable-solutions.net) (62.212.99.186) by sources.redhat.com with SMTP; 30 Jul 2003 04:56:35 -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 h6U4uKSu019717; Wed, 30 Jul 2003 06:56:20 +0200 Received: (from gdr@localhost) by uniton.integrable-solutions.net (8.12.3/8.12.3/Submit) id h6U4uGKI019716; Wed, 30 Jul 2003 06:56:16 +0200 X-Authentication-Warning: uniton.integrable-solutions.net: gdr set sender to gdr@integrable-solutions.net using -f To: Alexandre Oliva Cc: Richard Guenther , gcc@gcc.gnu.org Subject: Re: std::pow implementation References: From: Gabriel Dos Reis In-Reply-To: Organization: Integrable Solutions Date: Wed, 30 Jul 2003 05:26:00 -0000 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2003-07/txt/msg02103.txt.bz2 Alexandre Oliva writes: | On Jul 29, 2003, Gabriel Dos Reis wrote: | | > Richard Guenther writes: | > | At some point the user _will_ | > | know better - why do you think we have __attribute__((always_inline)) and | > | __attribute__((noinline))? | | > We got __attribute__((always_inline)) because it was decided that the | > compiler knows better than the programmer and the obvious syntax | > "inline" should be a comment. Then people reinvented "inline" with a | > different syntax. | | Nope. always_inline was introduced for situations in which, if | inlining does not happen, the program won't run, as it is the case in | early bootstrapping cases in the dynamic loader and in kernels, where | issuing a function call will fail because the code hasn't been | relocated yet. If you give inline its original meaning, you won't run into the risk of the situation you're describing. [...] | They are not designed to tune inlining, they're designed to impose | requirements on the compiler's behavior. If they're abused for other | purposes, there's unfortunately nothing we can do about it other than | try to educate people about their intended uses. Why do you think "inline" is different? -- Gaby