[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gcc-bugs
Subject:    [Bug middle-end/18071] [4.0/4.1/4.2 Regression] -Winline does not respect -fno-default-inline
From:       "lopezibanez at gmail dot com" <gcc-bugzilla () gcc ! gnu ! org>
Date:       2006-09-30 12:36:15
Message-ID: 20060930123615.28519.qmail () sourceware ! org
[Download RAW message or body]



------- 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

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic