This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Patch, ObjC/C++ V2, Part1] Recognize attributes on class, category and protocol declarations.
- From: "Nicola Pero" <nicola dot pero at meta-innovation dot com>
- To: "IainS" <developer at sandoe-acoustics dot co dot uk>
- Cc: "Mike Stump" <mrs at gcc dot gnu dot org>, "GCC Patches" <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 28 Sep 2010 23:02:42 +0200 (CEST)
- Subject: Re: [Patch, ObjC/C++ V2, Part1] Recognize attributes on class, category and protocol declarations.
> As observed before, we need fairly soon to identify the tags by which
> various capabilities are to be discriminated.
I thought about this while writing
http://gcc.gnu.org/ml/gcc-patches/2010-09/msg02168.html
[PS: Mike, that documentation patch is awaiting your approval ;-)]
and I would keep it really simple (for now):
* "traditional" Objective-C (as documented in NeXTstep book and implemented by GCC 2.95).
Syntax always available when you compile Objective-C.
* "traditional" Objective-C plus Objective-C exceptions. Objective-C exceptions are already
enabled by the -fobjc-exceptions flag. Without it, the compiler will @throw ;-) an error.
* "Objective-C 2.0" - which is "traditional" Objective-C plus Objective-C exceptions plus
"Objective 2.0" extensions - the language that Apple shipped with Mac OS X 10.6.
Do you know what flags Apple has to control Objective-C 2.0 vs. Objective 1.0 ?
Our problem is that the new ABI won't be there for 4.6 - it's too late to implement it, but it's
not too late to implement part of the new Objective-C 2.0 features that don't depend on the ABI
(eg, class/protocol/method attributes, fast enumeration etc), so maybe we do want to separate
the two things.
I guess it would make sense to have separate flags (-objc-lang=objc2 vs -fobjc-abi-version=2) ?
Comments welcome :-)
Thanks