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: objc-c++?


> reading the GNUStep FAQ, i just learned that Apple submitted patches 
> (probably for gcc3?) to make it work w/ obj-c++.  What is the status of 
> this?  Have they been accepted?  If not, why?  As a c++ programmer 
> trying to learn obj-c, the obj-c++ stuff would be very beneficial to me.

Yes, Apple has donated code to support obj-c++ (for which we are grateful
to Apple), but it has not been integrated into the official sources yet.

The reason for the delay in getting is that there's a project to do a
major rewrite of the C++ parser, and it's deemed preferable to merge
Apple's Obj-C++ after that rewrite is done and not before (since otherwise
the work would just have to be completely redone).

The rewrite is needed because there's little hope of ever fixing certain
problems (such as those mentioned on the http://gcc.gnu.org/bugs.html
page) with the current parser.  These mostly have to do with
distinguishing a declaration from an expression involving a constructor
call, which can require arbitrary lookahead.  GCC currently tries to solve
such problems by adding a special "spew" pass between the lexer and the
parser to provide more lookahead, but there are cases where this goes
wrong (though thanks to a decade or so of heroic kludgery by our C++
wizards, it's amazing how well it does work).  The plan is to replace the
bison-generated parser with a hand-written parser.


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