This is the mail archive of the gcc@gcc.gnu.org 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
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
converted.

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
http://gcc.gnu.org/ml/gcc/2004-06/msg01335.html

Again, the wish to move to C++ is expressed in the feedback to that.

PROPOSAL

A C++ compiler be required as the bootstrap compiler.

IMPLEMENTATION

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.

LANGUAGE SUBSET

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

--
Nathan Sidwell    ::   http://www.codesourcery.com   ::     CodeSourcery LLC
nathan@codesourcery.com    ::     http://www.planetfall.pwp.blueyonder.co.uk



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