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]

PROPOSAL: Objective-C++


PUTTING OBJECTIVE-C++ INTO GCC 3.x

As some of you may know, Apple is currently using a customized
gcc 2.95.2 as its system compiler for Mac OS X.  One of the
Apple additions to its gcc 2.95.2 is a front-end for the
Objective-C++ language (cc1objplus).

The Objective-C++ language may be thought of an extension of C++,
analogously to how Objective-C extends C.  The language was
originally envisioned as an interface technology, enabling users
to directly invoke Objective-C APIs (such as NeXTStep/GNUStep, or
Cocoa on Mac OS X) from C++ code -- and vice versa -- without the
need for C glue code.  Needless to say, Objective-C++ is extremely
useful in this regard, allowing developers to port applications
to Mac OS X (and other platforms with existing Objective-C
frameworks) with much more ease.

To the seasoned programmer :), Objective-C++ provides an opportunity
to leverage the characteristics of both C++ and Objective-C in the
same translation unit.  The C++ and Objective-C object models
complement each other quite nicely, allowing programmers to make
trade-offs between efficiency and type-safety on the one hand, and
flexibility and dynamism on the other.

Unfortunately, even though it may be of interest to the outside
community (e.g., GNUStep users), the existing 2.95.2 version of
Objective-C++ is not really in a state amenable to integration into
FSF 2.95.x sources.  But . . .

We are currently working on rolling out gcc 3.x on Mac OS X.
Obviously, this work will include bringing up the Objective-C++
3.x front-end.  This time around, however, we would like to
coordinate its development with the community at large, so
that the finished (or even evolving) product can become part
of the FSF tree.  Obviously, we will strive to integrate
Objective-C++ into the FSF tree in such a way that it will
have minimal impact on those _not_ wishing to use it. :)

The purpose of this post is twofold.  First, we'd like
to know whether there exists an interest in the community
for incorporating Objective-C++ capability into FSF gcc 3.x.

Second, if there _is_ interest, we would like to request
permission to make one small change to the C++ build
process _right now_ that would make everyone's life
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.

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. :)

Thanks for reading this.  We look forward to hearing from all
of you.

--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


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