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)
Alexandre Oliva <aoliva at redhat dot com> writes:
| 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?
>From my perspective, the answer is clear cut : yes.
The in-class definition isn't done lightly, just like putting the
inline specifier if the function were defined outside the class.
I can't see why that would even be a question of debate.
(Yes, I know that GCC used, in the past, to be doing a silly
distinction but that was silly).
-- Gaby