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]

Unified front end for C and C++ (was Re: New C parser [patch])


On Oct 25, 2004, at 4:42 PM, Scott Robert Ladd wrote:

Ziemowit Laski wrote:
While I don't buy these time estimates (not both simultaneously, anyway), I do
agree that you would take a performance hit, at least in the short-term,
especially for plain C code.

I don't think this is a hit GCC's users can afford at this point. Another compile time regression may bring the hordes with pitchforks and torches... ;)


Also, C and C++ are heading down different and incompatible paths. It will be increasingly difficult to manage the subtle-but-important differences in a single front end if the two languages continue to diverge.

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.


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.

(Changing the subject line because this no longer has much to do with Joseph's patch.)

--Matt


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