From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25922 invoked by alias); 15 Jan 2008 16:45:33 -0000 Received: (qmail 25111 invoked by uid 48); 15 Jan 2008 16:44:46 -0000 Date: Tue, 15 Jan 2008 17:21:00 -0000 Message-ID: <20080115164446.25110.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug middle-end/18071] [4.0/4.1/4.2/4.3 Regression] -Winline does not respect -fno-default-inline In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "manu at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2008-01/txt/msg01522.txt.bz2 ------- Comment #35 from manu at gcc dot gnu dot org 2008-01-15 16:44 ------- (In reply to comment #33) > Yes, this is what I understand. I think we need a new flag specifying > if in the source the 'inline' keyword was used and solely use that for > inline warning purposes. (That is, I would not expect to get a warning > for non-'inline' class methods either, regardless of -fdefault-inline > setting). > Then, you would need more than a new flag. Currently the problem is to distinguish 1) the explicit 'inline' keyword and the implicit inline keyword of -fdefault-inline from 2) no inline whatsoever and no inline because of -fno-default-inline Currently: explicit inline: DECL_DECLARED_INLINE fdefault-inline : DECL_DECLARED_INLINE fno-default-inline: DECL_DECLARED_INLINE no inline: (DECL_INLINE is an internal note that the function may be inlinable. Neither explicit inline nor -fdefault-inline actually ensure that DECL_INLINE will be always true). Ideally: explicit inline: DECL_DECLARED_INLINE && DECL_INLINE_LINKAGE fdefault-inline : DECL_DECLARED_INLINE && DECL_INLINE_LINKAGE fno-default-inline: DECL_INLINE_LINKAGE no inline: In your proposal we will need: explicit inline: DECL_EXPLICITLY_DECLARED_INLINE && DECL_DECLARED_INLINE && DECL_INLINE_LINKAGE fdefault-inline : DECL_DECLARED_INLINE && DECL_INLINE_LINKAGE fno-default-inline: DECL_INLINE_LINKAGE no inline: -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18071