This is the mail archive of the
mailing list for the GCC project.
Re: PR middle-end/18071 -Winline does not respect -fno-default-inline
- From: "Manuel López-Ibáñez" <lopezibanez at gmail dot com>
- To: "Geoff Keating" <geoffk at apple dot com>
- Cc: "gcc-patches List" <gcc-patches at gcc dot gnu dot org>
- Date: Sun, 8 Jul 2007 11:30:03 +0100
- Subject: Re: PR middle-end/18071 -Winline does not respect -fno-default-inline
- References: <FF0C9F40-558E-4860-AEA7-601229034C42@apple.com>
On 06/07/07, Geoff Keating <firstname.lastname@example.org> wrote:
> 2007-01-16 Manuel Lopez-Ibanez <email@example.com>
> * 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
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.