This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Putting C++ code into gcc front end
- From: dewar at gnat dot com (Robert Dewar)
- To: geoffk at geoffk dot org, neil at daikokuya dot co dot uk
- Cc: gcc at gcc dot gnu dot org, per at bothner dot com, tromey at redhat dot com
- Date: Sat, 8 Mar 2003 12:26:45 -0500 (EST)
- Subject: Re: Putting C++ code into gcc front end
> > > Every front end should have it's own representation, which should be
> > > lowered to something common like GIMPLE that is simple, well-
> > > documented, and yet expressive enough to be useful to everyone. I
> > > feel we can't make real progress any other way. Imagine how
> > > maintainable each front-end having its own high-level IR with real
> > > distinct C structs and unions would be.
In the case of GNAT, the tree we use in the fr0ont end is precisely keyed to
the Ada standard. The strucure of the tree exactly matches that of the grammar
in the RM (one advantage of using a hand written parser that does not require
molestation of the grammar), and the internal nomenclature of this tree exactly
matches the usage of technical terms in the RM>
For us, that is far more important than aiming at commonality at that stage. We
looked early on at the idea of trying to be compatible in some sense with what
other front end were doing, but it was not seriously considered, since we have
found it *so* important to maintain faithfullness to the defining document
within the text of the compiler front end. The few places we have deviated from
it (for good reasons of course :-) have often been trouble spots.