This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: ping regression patches

Geoff Keating <> wrote:

>>>> -Winline and -fno-default-inline
>>> This patch is not right.  The whole point of -Winline is to warn
>>> about functions that the compiler for some reason considers not
>>> inlineable, even
>>> if the reason seems dumb (like "you said -fno-inline").
>> That would make sense for -Winline and -fno-inline, but does it
>> apply to -fno-default-inline?  That seems more like an implied source
>> transformation - "delete these implicit newline keywords".
> -fno-default-inline shouldn't *prevent* inlining, it just means a
> method inside the class definition has to qualify for inlining like
> any other routine.  So I'm really not sure why -Winline would need to
> handle such routines specially.

Because the manual says that -Winline should "Warn if a function can not be
inlined and it was declared as inline.". When you specify -Winline, a method
defined within a class definition is not declared as inline (as it normally
would). If it is not declared as inline, -Winline should not care about it: it
should treat it exactly as it was defined outside the class definition, without
any explicint "inline" keyword.

Giovanni Bajo

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]