This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: PROPOSAL: Objective-C++
- To: Stan Shebs <shebs at apple dot com>
- Subject: Re: PROPOSAL: Objective-C++
- From: Ziemowit Laski <zlaski at apple dot com>
- Date: Tue, 13 Nov 2001 16:03:35 -0800
- Cc: Phil Edwards <pedwards at disaster dot jaj dot com>, gcc at gcc dot gnu dot org
On Tuesday, November 13, 2001, at 03:45 , Stan Shebs wrote:
> Phil Edwards wrote:
>>
>> I know nothing about Objective-C, so I have only two comments:
>>
>>> easier from then on. The idea is to change gcc/cp/parse.y
>>> to gcc/cp/cp-parse.in, and then use sed to separate out
>>> the C++ and Objective-C++ portions of the Yacc file,
>>> _exactly_ as is presently being done with C and Objective-C.
>>
>> Are you aware of the cp-parser-branch? The current parse.y is on its
>> way out.
>
> Yup, we're aware of it - and that it has no timetable for
> going into the trunk. So yeah, parse.y might not be that long
> lived, but then again it might be one of those "temporary"
> situations that lasts for 5-10 years (we've certainly seen a
> few of those in GNU, heh-heh).
>
>>> The good news about adding Objective-C++ to gcc is that
>>> very little actual new code will be required! Most of the
>>> functionality already exists in the cp/ and objc/ folders. :)
>>
>> What kind of library support is required by Objective-C++? No changes
>> at all, or a few tweaks to libstdc++-v3, or an entirely new
>> libstdobjc++
>> library, or what? :-) Again, I know nothing about the language, so
>> this
>> question may be completely moot.
>
> Zem can correct me on this, but I don't know of any library
> changes that we've had to do for ObjC++. Every valid C++ program
> is a valid ObjC++ program, so plain C++ code doesn't need to change.
> It's always been possible to link -lobjc -lstdc++ into a single
> program.
Yup -- libobjc and libstdc++ are orthogonal to each other, you can
link against either one or both.
> In a way, ObjC++ is the "ultimate C dialect" :-) since it can
> take any of C, ObjC, and C++ source code (modulo those nasty little
> C/C++ incompats, of course).
Actually, that's true! It's sort of one more reason to go the parse.y
way -- we can iteratively decide what that ultimate dialect is (doing
this with a recursive-descent parser is more difficult), and only
when we're all happy put it into cp-parser-branch.
--Zem
--------------------------------------------------------------
Ziemowit Laski Apple Computer, Inc.
zlaski@apple.com 2 Infinite Loop, MS 302-4SN
+1.408.974.6229 Fax .1344 Cupertino, CA 95014-2085