From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26769 invoked by alias); 18 Oct 2004 00:18:55 -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 26758 invoked from network); 18 Oct 2004 00:18:53 -0000 Received: from unknown (HELO mail.codesourcery.com) (65.74.133.9) by sourceware.org with SMTP; 18 Oct 2004 00:18:53 -0000 Received: (qmail 5085 invoked from network); 18 Oct 2004 00:18:52 -0000 Received: from taltos.codesourcery.com (zack@66.92.218.83) by mail.codesourcery.com with DES-CBC3-SHA encrypted SMTP; 18 Oct 2004 00:18:52 -0000 Received: by taltos.codesourcery.com (sSMTP sendmail emulation); Sun, 17 Oct 2004 17:18:52 -0700 To: Eliot Dresselhaus Cc: gcc@gcc.gnu.org Subject: Re: bug w/ inline of inline? References: <200410172348.i9HNmoX04480@bemr-lnx-002.cisco.com> From: Zack Weinberg Date: Mon, 18 Oct 2004 06:23:00 -0000 In-Reply-To: <200410172348.i9HNmoX04480@bemr-lnx-002.cisco.com> (Eliot Dresselhaus's message of "Sun, 17 Oct 2004 16:48:50 -0700") Message-ID: <877jposwsz.fsf@codesourcery.com> User-Agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2004-10/txt/msg00681.txt.bz2 Eliot Dresselhaus writes: > In this example > > static inline int f (int x) { return x + 1; } > > static inline int g (int x, inline int f (int x)) > { return 1 + f (x); } > > int h (int x) > { return g (x, f); } > > is h supposed to optimize to return x + 2 or supposed to actually call > f. GCC is allowed to do either. It would be good if it produced "return x + 2;" Please file a missed-optimization bug report. Note that declaring the parameter inline is incorrect C. zw