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: Gabriel Dos Reis <gdr at integrable-solutions dot net>
- To: dewar at gnat dot com (Robert Dewar)
- Cc: aoliva at redhat dot com, bernds at redhat dot com, gcc at gcc dot gnu dot org, geoffk at geoffk dot org, jbuck at synopsys dot com
- Date: 18 Mar 2003 04:25:06 +0100
- Subject: Re: -fobey-inline (was Re: gcc and inlining)
- Organization: Integrable Solutions
- References: <20030318031649.407E4F2D47@nile.gnat.com>
dewar at gnat dot com (Robert Dewar) writes:
| > I agree with that. But that is not an argument to ignore the inline
| > implied by in-class function definition: That is part of common C++
| > styles of writing programs.
|
| Well it might be. if typically this implicit inlining causes programs to
| slow down by excessive inlining, then the compiler is probably choosing
| wrong defaults.
Then, the same is true for "inline" specified for a function defined
out-of-class. Which meets something that has been said earlier about
"inline" in C++.
In fact, it is unaccurate to speak of implicit inlining for in-class
defined functions.
We should be speaking of "implicit inlining" when the function
is defined *out-of-line* and the compiler thinks it knows better.
Or else, we'll create confusion (if we hadn't already succeeded ;-)
-- Gaby