On inlining in C++
Robert Dewar
dewar@gnat.com
Tue Aug 5 17:28:00 GMT 2003
> 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.
More information about the Gcc
mailing list