From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12901 invoked by alias); 31 May 2011 09:25:55 -0000 Received: (qmail 12873 invoked by uid 22791); 31 May 2011 09:25:55 -0000 X-SWARE-Spam-Status: No, hits=-6.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 31 May 2011 09:25:36 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p4V9Pa0h019296 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 31 May 2011 05:25:36 -0400 Received: from tyan-ft48-01.lab.bos.redhat.com (tyan-ft48-01.lab.bos.redhat.com [10.16.42.4]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p4V9PZeX022959 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 31 May 2011 05:25:35 -0400 Received: from tyan-ft48-01.lab.bos.redhat.com (localhost.localdomain [127.0.0.1]) by tyan-ft48-01.lab.bos.redhat.com (8.14.4/8.14.4) with ESMTP id p4V9PZd5012675; Tue, 31 May 2011 11:25:35 +0200 Received: (from jakub@localhost) by tyan-ft48-01.lab.bos.redhat.com (8.14.4/8.14.4/Submit) id p4V9PXrM012674; Tue, 31 May 2011 11:25:33 +0200 Date: Tue, 31 May 2011 12:28:00 -0000 From: Jakub Jelinek To: Richard Guenther Cc: Christian Bruel , GCC Patches Subject: Re: [PATH] PR/49139 fix always_inline failures diagnostics Message-ID: <20110531092533.GO17079@tyan-ft48-01.lab.bos.redhat.com> Reply-To: Jakub Jelinek References: <4DE49EBE.30804@st.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2011-05/txt/msg02410.txt.bz2 On Tue, May 31, 2011 at 11:18:18AM +0200, Richard Guenther wrote: > The patch is not ok, we may not fail to inline an always_inline > function. To make this more consistent I proposed to warn > whenever you take the address of an always_inline function > (because then you can confuse GCC by indirectly calling > such function which we might inline dependent on optimization > setting and which we might discover we didn't inline only > dependent on optimization setting). Honza proposed to move That would warn on a lot of valid programs. Even #include void *readptr = read; would warn, because read is both extern and extern __inline __attribute__ ((__always_inline__, __artificial__, __gnu_inline__, __warn_unused_result__)) ssize_t read (int __fd, void *__buf, size_t __nbytes) { ... } wrapper. Similarly dozens of other functions. glibc relies on extern inline gnu_inline behavior there, if you take address, the extern is used instead of the inline. Jakub