This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: -fobey-inline (was Re: gcc and inlining)


On Sat, 15 Mar 2003, Robert Dewar wrote:

> > And why not?  If I add the "inline" keyword, I do it for a good reason (I
> > want the function inlined).
> 
> even if it makes your program run slower? I think most programmers would
> answer no .. they write inline to speed up their program, not slow it down
> and make it bigger and slower :-)

Well, you'd assume the person who adds "inline" has done measurements or
looked at the generated assembly.  Humans are intelligent, something that is
in general not true for computer programs.  A source-level decision with the
"inline" keyword can easily be controlled by the user - unless the compiler
decides that it obviously knows more than the programmer.  In that case,
you either end up completely lacking the necessary control, or growing warts
like "-fobey-inline" or the "always_inline" attribute.


Bernd


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]