[Patch, ObjC/C++ V2, Part1] Recognize attributes on class, category and protocol declarations.
Nicola Pero
nicola.pero@meta-innovation.com
Wed Sep 29 13:53:00 GMT 2010
> 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
More information about the Gcc-patches
mailing list