This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[SC] Require C++ for bootstrapping

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  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    ::   ::     CodeSourcery LLC    ::

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]