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: Tim Josling <tej at melbpc dot org dot au>
- To: gcc at gcc dot gnu dot org
- Cc: bernds at redhat dot com, geoffk at geoffk dot org, jbuck at synopsys dot com
- Date: Mon, 17 Mar 2003 18:53:29 +1100
- Subject: Re: -fobey-inline (was Re: gcc and inlining)
- Organization: Melbourne PC User Group
- References: <1047828505.4119.ezmlm@gcc.gnu.org>
On Sat, 15 Mar 2003, Robert Dewar wrote:
Let me remind you that we are discussing the effects of a change in
behaviour of our C compiler. What Ada programmers do or don't do may be
influenced by the behaviour of Ada compilers and might therefore not be
entirely relevant.
Correct. My old copy of the manual states that inline 'directs'
the compiler to inline the function.
More broadly, the C philosophy is that in C we allow the programmer to make mistakes,
on the basis that if they wanted to program in modula-2 and have mother decide everything for them
they would have done so.
Mostly, the compiler may make the right decision, but sometimes it does not.
For those cases the programmer should be able to override. It is not just about efficiency,
but also the size of the stack etc, all sorts of things the compiler may not know.
Tim Josling