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]

Re: A FrontEnd in C++?


Michael S. Zick wrote:
>Writing a front end in C++ would make that process:
>
>Stage0: any 'ol C compiler -> gcc<c, c++>
>Stage1: gcc<c, c++> + new_frontend -> gcc<c, c++, New>
>Stage2: gcc<c, c++, New> -> presumably_finished_compiler
>Stage3: presumably_finished_compiler -> finished_compiler
>
>Compare Stage2 with Stage3, if same; then done; else punt!

Why?

You just need to treat the new front end the same as, say, the C++ Standard
Library, which requires C++ to build.

So you really get the exact same as what we have now.

Unamed Stage0: any 'ol C compiler -> gcc<c>
Stage1: gcc<c> -> presumably_finished_compiler <c, c++, F77, Java>
Stage2: presumably_finished_compiler -> finished_compiler <c, c++, F77, Java>

Compare stage1 and stage2

If they compare, then do the unnamed stage3 which is to build Fortran's, C++'s,
and Java's Libraries as well as your new Frontend that was written in C++.

Of course, I don't see that there is a good reason other than "It's always been
done that way" and for a greater code sample for the compare to build C++, F77,
and Java in stage 1.  But that is not for this discussion.

Kelley Cook


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