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)
Joe Buck <jbuck at synopsys dot com> writes:
| 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.
That would be a disaster on STL-like code where function-object's
operator() are commonly defined in the enclosing class. I can't see
any compeling reason why we should introduce that artificial distinction.
-- Gaby