This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PING^3] PR middle-end/18071 -Winline does not respect -fno-default-inline
- From: Mark Mitchell <mark at codesourcery dot com>
- To: Manuel López-Ibáñez <lopezibanez at gmail dot com>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Sun, 04 Mar 2007 12:32:36 -0800
- Subject: Re: [PING^3] PR middle-end/18071 -Winline does not respect -fno-default-inline
- References: <6c33472e0702071229q497ede7blfdbf27619d20ceba@mail.gmail.com> <6c33472e0702161016q25f83139n860a9ae6b29d7fa@mail.gmail.com> <6c33472e0702230129p521b9ccam36957a9f97a6ef2c@mail.gmail.com>
Manuel López-Ibáñez wrote:
> cp/
> * decl.c (start_method): Don't set DECL_DECLARED_INLINE_P if
> -fno-default-inline.
I don't think this change is correct. DECL_DECLARED_INLINE_P controls
linkage, and -fno-default-inline is documented as not changing linkage.
Thus, the change that you're making might affect the linkage of inline
functions in object files, which would be bad. The C++ front end sets
DECL_DECLARED_INLINE_P, but no DECL_INLINE, which seems exactly
consistent with the documentation: this function should be treated as
inline for linkage purposes, but the middle end should not try to inline it.
--
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713