From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28580 invoked by alias); 30 Sep 2006 12:36:31 -0000 Received: (qmail 28520 invoked by uid 48); 30 Sep 2006 12:36:15 -0000 Date: Sat, 30 Sep 2006 12:36:00 -0000 Message-ID: <20060930123615.28519.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug middle-end/18071] [4.0/4.1/4.2 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: "lopezibanez at gmail dot com" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2006-09/txt/msg02819.txt.bz2 List-Id: ------- Comment #23 from lopezibanez at gmail dot com 2006-09-30 12:36 ------- I think I found out what is going on, although I cannot decide myself what is the correct action. For functions declared within class scope we do: (gcc/cp/decl.c start_method() line 11285) DECL_DECLARED_INLINE_P (fndecl) = 1; if (flag_default_inline) DECL_INLINE (fndecl) = 1; Winline tests DECL_DECLARED_INLINE (which is correct). However, as shown above, fno-default-inline does not change the DECL_DECLARED_INLINE but DECL_INLINE. Solutions: 1) Nothing, things are correct as they are. 2) When we are going to emit the warning, we check for fno-default-inline and check that the function is declared within class scope. I have no idea how to do this or whether it is appropriate. 3) fno-default-inline sets both DECL_DECLARED_INLINE and DECL_INLINE to false. It may break other things and the text of fno-default-inline says that these functions will have linkage like inline functions. 4) Something else. -- lopezibanez at gmail dot com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lopezibanez at gmail dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18071