This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Converting GCC to compilation with C++
Ben Elliston wrote:
Robert Dewar <dewar@gnat.com> writes:
By bootstrapping the compiler via a subset-of-C++ front-end that
wouldn't bootstrap if you deviated outside of that subset? ;-)
You are assuming that the set of restrictions can be formulated
in a manner that is easily checkable.
After all, we also have a coding standard requiring clear readable
code, but unfortunately we do not have a "subset-of-C" front end
that enforces this restriction :-)
As an example of this difficulty, consider a (reasonable) rule
that says that functions must from a conceptual point of view
be side effect free.
That's not easy to check in a way that allows side effects that
do not violate the "conceptual" part of this rule. For example,
memoizing tables, or a counter that counts the number of times
a function is called.
Ben