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: Bridging the new C/C++ grok....() impedance mismatch


On 6 Jul, 2004, at 12.00, Mark Mitchell wrote:

Ziemowit Laski wrote:


No. You could do that, but it would be inefficient; better just to create the data structures you want in the first place... (Or, if you really want to be a hero, merge the C and C++ front ends, so that you don't have to be trying to talk to two front ends...)


Hmm, that's tempting... by "merge the C and C++ front-ends", hopefully you mean "tweak the C++ front-end to also accept C"? Most of that work should be fairly trivial, me thinks; the tricky part will be in handling areas where C++ and C99 differ.

Yes, exactly. And those parts are not terribly hard; for example, the differing pointer conversion rules should just require loosening a few tests in C++. Adding K&R support is one of the nastier bits. It's months of work, but not years.


Having a unified front-end would definitely make my life _way_ easier, but I'm wondering if this is doable in the 3.5 time frame. What do you think?

Sadly, no, I don't think that's possible.

Yeah, I agree...

However, I'm actually opposed to trying to abstract away more bits from the two front ends into c-common.c with more langhooks back into the front ends; to me, that effort should instead go into adding C support to cc1plus.

That's a reasonable stance to take once we agree to move forward with C support in cc1plus; prior to that point, however, additional hooks may be unavoidable.


--Zem
--------------------------------------------------------------
Ziemowit Laski                 1 Infinite Loop, MS 301-2K
Mac OS X Compiler Group        Cupertino, CA USA  95014-2083
Apple Computer, Inc.           +1.408.974.6229  Fax .5477


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