This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: On inlining in C++
- From: dewar at gnat dot com (Robert Dewar)
- To: dewar at gnat dot com, gdr at integrable-solutions dot net
- Cc: aph at redhat dot com, coyote at coyotegulch dot com, gcc at gcc dot gnu dot org
- Date: Tue, 5 Aug 2003 12:58:42 -0400 (EDT)
- Subject: Re: On inlining in C++
> So?
>
> -- Gaby
So, the notion of trusting the programmer is not an absolute one. C++ is
fairly far from what Tuck would call a WYSIWYG language, where you have a
reasonable knowledge of the code being generated at all times. Dispatching,
elaboration, destructor handling, exceptions, are among many cases where
the implementation model is entirely undefined by the language, and varies
between implementations, so if you expect your trusted programmer to know
what is going on, that's not always achievable.
To some extent, the current discussion is on whether inlining should or
should not be WYSIWYG in Tuck's sense (I find this quite a useful
notion in language design and implemenation). Gaby and others argue (without
much data, but with much passion) that inlining should never be up to the
compiler. Others argue (without much data, but with much passion) that of
course the implementation model for inlining should be something the
compiler controls.