From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26777 invoked by alias); 31 Jul 2003 16:09:05 -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 26737 invoked from network); 31 Jul 2003 16:09:04 -0000 Received: from unknown (HELO ams002.ftl.affinity.com) (216.219.253.199) by sources.redhat.com with SMTP; 31 Jul 2003 16:09:04 -0000 Received: from coyotegulch.com ([68.200.44.160]) by ams.ftl.affinity.com with ESMTP id <559303-29838>; Thu, 31 Jul 2003 12:09:02 -0400 Message-ID: <3F293F1C.2000001@coyotegulch.com> Date: Thu, 31 Jul 2003 18:45:00 -0000 From: Scott Robert Ladd User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030714 Debian/1.4-2 X-Accept-Language: en MIME-Version: 1.0 To: Steven Bosscher CC: Rob Taylor , "Gcc@Gcc. Gnu. Org" Subject: Re: std::pow implementation References: <041f01c3574f$f51e9180$b800a8c0@eventhorizon> <3F29159B.8060609@coyotegulch.com> <1059663307.3638.19.camel@steven.lr-s.tudelft.nl> In-Reply-To: <1059663307.3638.19.camel@steven.lr-s.tudelft.nl> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2003-07/txt/msg02321.txt.bz2 Steven Bosscher wrote: >>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. > > I thought that the whole point in this discussion is that some people > argue that the compiler cannot know when inlining an `inline' declared > function is blatantly inefficient. A decent compiler should be able to recognize patterns (e.g., big functions that can't be reduced) that render inlining inefficient. And rejecting silly (i.e., undefined) requests, such as inlining "main", is to be expected. In an ideal universe, explicit "inline" shouldn't be required (or even desirable.) Alas, current compiler technology is far from that ideal, and so responsibility for intelligent choices should fall to the programmer, not the compiler. -- Scott Robert Ladd Coyote Gulch Productions (http://www.coyotegulch.com) Software Invention for High-Performance Computing