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: PR middle-end/18071 -Winline does not respect -fno-default-inline

On 06/07/07, Geoff Keating <> wrote:
> 2007-01-16 Manuel Lopez-Ibanez <>

> * It does not set DECL_DECLARED_INLINE_P for methods unless they are
> declared inline or -fdefault-inline is true (which is the default).

will break the C++ linkage model; for instance, you'll get these
methods as the key method of a class.

I'm tempted to declare the compiler's behaviour as correct, since it
is doing what it is documented to do: functions inside a class are
still declared inline, and they're not being inlined, so -Winline
should produce a warning about it.  There's a similar case with -fno-

So what is the difference between declaring a method "inline" and using -fdefault-inline?

The point is: what is the meaning of DECL_DECLARED_INLINE_P? As I
understand it, it means that the declaration includes explicitly the
word "inline" (how to detect this otherwise?). For example,
-finline-functions does not actually sets DECL_DECLARED_INLINE_P for
all functions, it just sets DECL_INLINE. -Winline (should) only warns
for solutions declared inline by the user, not assumed inline by the

The case of fno-inline is not similar, it is actually the same. I
think my patch fixes that one as well.



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