This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: A FrontEnd in C++?
Hi,
On Wed, Aug 21, 2002 at 02:50:47PM -0400, Daniel Berlin wrote:
> >
> > P.S.: I even thought sometimes about (re)writing some of the optimizations
> > in C++.
>
> I've actually started doing it many times.
> In particular, i've still got the start of an interprocedural middle-end
> (IE takes trees from many modules) written in C++.
>
> You can't believe how nice it is to just simply be able to do things like
> std::set<tree>, etc.
> It seems trivial, but it's really a lot nicer to work with classes.
>
Why not beginning to write the AST optimizer in C++?
The AST optimizer is not needed for building the C, nor the C++ compiler,
but once g++ is built we could build the AST optimizer.
This way we avoid to require a C++ compiler for building a part of GCC.