This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: -fobey-inline (was Re: gcc and inlining)
- From: Richard Earnshaw <rearnsha at arm dot com>
- To: Andrew Haley <aph at redhat dot com>
- Cc: Richard dot Earnshaw at arm dot com, gcc at gcc dot gnu dot org
- Date: Thu, 13 Mar 2003 14:00:35 +0000
- Subject: Re: -fobey-inline (was Re: gcc and inlining)
- Organization: ARM Ltd.
- Reply-to: Richard dot Earnshaw at arm dot com
> Richard Earnshaw writes:
> > >
> > > -fobey-inline is more of a correctness issue than a performance issue
> > > for the people who need it.
> >
> > No, it's a compile my buggy program issue.
> >
> > There is no guarantee in the standard that an "inline" function will be
> > inlined.
>
> Yes, but there are places where being able to guarantee inlining are
> very useful. glibc has one in the shared library loader, and there
> are places in a kernel where it is essential to inline (perhaps
> because there is no stack) but people are forced to use macros if
> inlining is not guaranteed. macros are bad for a bunch of reasons,
> not the least of which is type safety.
>
And we have an attribute (always_inline) for that case. We don't need
another method as well.
R.