From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2910 invoked by alias); 4 Aug 2003 17:26:41 -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 2885 invoked from network); 4 Aug 2003 17:26:41 -0000 Received: from unknown (HELO nile.gnat.com) (205.232.38.5) by sources.redhat.com with SMTP; 4 Aug 2003 17:26:41 -0000 Received: by nile.gnat.com (Postfix, from userid 338) id AB3C6F2D85; Mon, 4 Aug 2003 13:26:40 -0400 (EDT) To: dewar@gnat.com, jbuck@synopsys.com Subject: Re: std::pow implementation Cc: aoliva@redhat.com, bernds@redhat.com, gcc@gcc.gnu.org, gdr@integrable-solutions.net, rguenth@tat.physik.uni-tuebingen.de, s.bosscher@student.tudelft.nl Message-Id: <20030804172640.AB3C6F2D85@nile.gnat.com> Date: Mon, 04 Aug 2003 17:33:00 -0000 From: dewar@gnat.com (Robert Dewar) X-SW-Source: 2003-08/txt/msg00158.txt.bz2 > Sigh. In C++, the programmer has already done the needed analysis, and > has attached the keyword "inline" or defined the function in the class > body. Certainly, with -O3 the kind of analysis you describe would be > appropriate, though possibly expensive. This claim is made repeatedly, but without any evidence. I think a lot of C++ programmers decide whether to put thins in the class body on the basis of other considerations than whether to inline -- a consideration that is pretty hard to do for the great majority of C++ (or Ada for that matter) programmers who have not the slightest awareness of machine language or its implications. I do agree that if the programmer has attached the keyword "inline" then that shows at least some thought, though whether it is well informed or not can often be an issue.