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)
On Sun, Mar 16, 2003 at 03:41:17PM -0300, Alexandre Oliva wrote:
> On Mar 15, 2003, Bernd Schmidt <bernds at redhat dot com> wrote:
>
> > And why not? If I add the "inline" keyword, I do it for a good reason (I
> > want the function inlined).
>
> What if you don't add the `inline' keyword, but define a member
> function inside the class body in C++? Per the C++ Standard, such a
> member function is implicitly `inline'. Must this inline marker get
> the same weight as a function defined outside the class body, with the
> inline keyword explicitly given?
I would be willing to accept as a compromise that such implicit inline
requests are somehow "weaker" than explicit use of the inline keyword.
But it's frustrating to have to write nonstandard C++ (sorry, use of
GNU directives is nonstandard) to get the compiler to behave as requested
when the word "inline" is explicitly typed.