This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/18071] [4.0/4.1/4.2/4.3 Regression] -Winline does not respect -fno-default-inline
- From: "rguenther at suse dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 15 Jan 2008 15:54:47 -0000
- Subject: [Bug middle-end/18071] [4.0/4.1/4.2/4.3 Regression] -Winline does not respect -fno-default-inline
- References: <bug-18071-4672@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #33 from rguenther at suse dot de 2008-01-15 15:54 -------
Subject: Re: [4.0/4.1/4.2/4.3 Regression] -Winline
does not respect -fno-default-inline
On Tue, 15 Jan 2008, hubicka at gcc dot gnu dot org wrote:
> ------- Comment #32 from hubicka at gcc dot gnu dot org 2008-01-15 15:47 -------
> I am bit confused by logic of code here. Middle end now ingore DECL_INLINE
> consistently, it is still arround since it affect some instantiation decisions
> in C++ FE. Does fno-default-inline work? I think only way to prevent inlining
> is to make C++ frontend to drop implicit noinline attribute or split the two
> meanings of DECL_DECLARED_INLINE (ie meaning to drive inliner and to drive
> linkage). As I understand it now, DECL_DECLARED_INLINE must be always set for
> functions that are implicitly inline, even with -fno-default-inline, because it
> affects linkage, right?
Yes, this is what I understand. I think we need a new flag specifying
if in the source the 'inline' keyword was used and solely use that for
inline warning purposes. (That is, I would not expect to get a warning
for non-'inline' class methods either, regardless of -fdefault-inline
setting).
Richard.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18071