This is the mail archive of the gcc-patches@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: Unified front end for C and C++ (was Re: New C parser [patch])


Matt Austern wrote:
On the one hand, that sounds plausible. On the other hand: gcc is the only compiler I know of that has separate source bases for the C and C++ front ends. Certainly EDG, MetroWerks, and Microsoft use the same source base for both, and at least one of those three uses not only the same source base but the same executable.

None of those companies, so far as I know, implement C++, nor do they try to. I believe one of the goals of GCC is full C99 support, which is difficult to reconcile with C++.


It may very well be true that getting from where we are to a common front end for C and C++ would be so hard that it's not worth doing. But we do have an existence proof that such a compiler is possible and that it's can be maintainable and fast.

And it may not be desirable if the two languages continue to diverge, which is likely.


--
Scott Robert Ladd
site: http://www.coyotegulch.com
blog: http://chaoticcoyote.blogspot.com


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