This is the mail archive of the
mailing list for the GCC project.
[SC] Require C++ for bootstrapping
- From: Nathan Sidwell <nathan at codesourcery dot com>
- To: Mark Mitchell <mark at codesourcery dot com>
- Cc: gcc <gcc at gcc dot gnu dot org>
- Date: Thu, 24 Jun 2004 10:22:34 +0100
- Subject: [SC] Require C++ for bootstrapping
- Organization: CodeSourcery LLC
Dear Steering Committee,
For some time there has been considerable desire for more static type
checking and dynamic type safety within GCC's tree structure. A proposal
was made at this year's GCC summit (paper and slides available at
http://www.codesourcery.com/publications.html). The proposal takes an
incremental unifying approach of remaining with C89 and replacing the
individual tree structures with a systematic implementation of a
type hierachy. The use of the accessor macros would remain unchanged,
their implementation would be updated as the underlying structure is
At that time, a simple two level scheme was shown, and even that induced
comments about switching to C++.
A more detailed design has been proposed, with a multilevel hierachy
(along with rationale as to why that is necessary), see
Again, the wish to move to C++ is expressed in the feedback to that.
A C++ compiler be required as the bootstrap compiler.
1) It will be necessary to make sure the codebase at present can
be compiled by both a C89 and C++ compilers. This might entail mechanical
patches to avoid C++ keywords, and additional casts for the more stricter
typing in C++.
2) Conversion of the build sequence to build g++ first
3) Moving the C frontend to a language specific directory, just as the
other frontends are. (optional)
4) Incremental conversion to C++ idioms, where those are prudent.
It is probably necessary to define the subset of C++ that shall be allowed.
Many see the use of C++ as a toe in the door, through which all the language
will eventually come. If a subset is defined, it will probably be necessary
to add warnings to G++ to detect when that subset is exceeded. the initial
subset will be merely single non virtual inheritance.
Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery LLC
email@example.com :: http://www.planetfall.pwp.blueyonder.co.uk