From patchwork Wed Nov 17 09:31:30 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicola Pero X-Patchwork-Id: 71535 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id E2D84B718A for ; Wed, 17 Nov 2010 20:31:45 +1100 (EST) Received: (qmail 7922 invoked by alias); 17 Nov 2010 09:31:43 -0000 Received: (qmail 7896 invoked by uid 22791); 17 Nov 2010 09:31:41 -0000 X-SWARE-Spam-Status: No, hits=-1.3 required=5.0 tests=AWL, BAYES_00, TW_BJ, TW_WW, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from fencepost.gnu.org (HELO fencepost.gnu.org) (140.186.70.10) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 17 Nov 2010 09:31:35 +0000 Received: from eggs.gnu.org ([140.186.70.92]:50023) by fencepost.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1PIeMV-0004dm-Fy for gcc-patches@gnu.org; Wed, 17 Nov 2010 04:31:31 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PIeMV-0004vQ-Cg for gcc-patches@gnu.org; Wed, 17 Nov 2010 04:31:32 -0500 Received: from smtp171.iad.emailsrvr.com ([207.97.245.171]:59225) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PIeMV-0004vI-8X for gcc-patches@gnu.org; Wed, 17 Nov 2010 04:31:31 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp47.relay.iad1a.emailsrvr.com (SMTP Server) with ESMTP id 8091B3A8A29 for ; Wed, 17 Nov 2010 04:31:30 -0500 (EST) Received: from dynamic5.wm-web.iad.mlsrvr.com (dynamic5.wm-web.iad1a.rsapps.net [192.168.2.146]) by smtp47.relay.iad1a.emailsrvr.com (SMTP Server) with ESMTP id 6D5583A8A28 for ; Wed, 17 Nov 2010 04:31:30 -0500 (EST) Received: from meta-innovation.com (localhost [127.0.0.1]) by dynamic5.wm-web.iad.mlsrvr.com (Postfix) with ESMTP id 5C2898D0505 for ; Wed, 17 Nov 2010 04:31:30 -0500 (EST) Received: by www2.webmail.us (Authenticated sender: nicola.pero@meta-innovation.com, from: nicola.pero@meta-innovation.com) with HTTP; Wed, 17 Nov 2010 10:31:30 +0100 (CET) Date: Wed, 17 Nov 2010 10:31:30 +0100 (CET) Subject: [wwwdocs]: Updated gcc-4.6/changes.html for Objective-C/Objective-C++ From: "Nicola Pero" To: "gcc-patches@gnu.org" MIME-Version: 1.0 X-Type: plain Message-ID: <1289986290.375121733@192.168.2.229> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org This patch updates the wwwdocs with the changes that were done for Objective-C and Objective-C++ for GCC 4.6. There's quite a lot of stuff :-) ... and I didn't include all the bugfixes. Two things to note: * @property + @optional is known not to work properly yet, but it's a bug and we'll fix it before release; I didn't mention it in the release notes. * I had to mention in the release notes that we now parse ObjC 2.0 class/protocol attributes but don't implement them. That is the honest state of affairs but actually looks bad on release notes; it would only take me a few hours to fix that and complete the implementation so I think I'll do that hopefully in the next week or so when I get a bit of time. Then we can amend the release notes and say that these are implemented too. Anyway, for now it's fair to say that they are parsed but not implemented. ;-) Ok to commit ? Thanks Index: changes.html =================================================================== RCS file: /cvs/gcc/wwwdocs/htdocs/gcc-4.6/changes.html,v retrieving revision 1.58 diff -u -r1.58 changes.html --- changes.html 7 Nov 2010 13:48:21 -0000 1.58 +++ changes.html 17 Nov 2010 09:11:46 -0000 @@ -293,6 +293,125 @@

Java (GCJ)

+

Objective-C and Objective-C++

+ +
    +
  • The -fobjc-excceptions flag is now required to + enable Objective-C exception and synchronization syntax + (introduced by the keywords @try, + @catch, @finally and + @synchronized).
  • + +
  • A number of Objective-C 2.0 features and extensions are now + supported by GCC. These features are enabled by default; you can + disable them by using the new -fobjc-std=objc1 + command-line option.
  • + +
  • The Objective-C 2.0 dot-syntax is now supported both in + Objective-C and Objective-C++. The dot-syntax is an alternative + syntax for using getters and setters; object.count is + automatically converted into [object count] or + [object setCount: ...] depending on context; for + example if (object.count > 0) is automatically + compiled into the equivalent of if ([object count] > + 0) while object.count = 0; is automatically + compiled into the equivalent ot [object setCount: + 0];. The dot-syntax can be used with instance and class + objects and with any setters or getters, no matter if they are + part of a declared property or not.
  • + +
  • Objective-C 2.0 declared properties are now supported both in + Objective-C and Objective-C++. Declared properties are declared + using the new @property keyword, and are most + commonly used in conjunction with the new Objective-C 2.0 + dot-syntax. The nonatomic, readonly, + readwrite, assign, retain, + copy, setter and getter + attributes are all supported. Marking declared properties with + __attribute__ ((deprecated)) is supported too.
  • + +
  • The Objective-C 2.0 @synthesize and + @dynamic keywords are supported both in Objective-C + and Objective-C++. @synthesize causes the compiler + to automatically synthesize a declared property, while + @dynamic is used to disable all warnings for a + declared property for which no implementation is provided at + compile time. Synthesizing declared properties requires runtime + support in most useful cases; to be able to use it with the GNU + runtime, appropriate helper functions have been added to the GNU + Objective-C runtime ABI, and are implemented by the GNU + Objective-C runtime library shipped with GCC.
  • + +
  • The Objective-C 2.0 fast enumeration syntax is supported in + Objective-C. This is currently not yet available in + Objective-C++. Fast enumeration requires support in the runtime, + and such support has been added to the GNU Objective-C runtime + library (shipped with GCC).
  • + +
  • The Objective-C 2.0 @optional keyword is + supported in Objective-C and Objective-C++. This keyword allows + you to mark methods or properties in a protocol as optional as + opposed to required.
  • + +
  • The Objective-C 2.0 @package keyword is + supported in Objective-C and Objective-C++. This keyword has + currently the same effect as the @public + keyword.
  • + +
  • Objective-C 2.0 method attributes are supported both in + Objective-C and Objective-C++. Currently the supported attributes + are deprecated, sentinel, + noreturn and format.
  • + +
  • Objective-C 2.0 method argument attributes are supported + both in Objective-C and Objective-C++. The most widely used + attribute is unused, to mark an argument as unused in + the implementation.
  • + +
  • Objective-C 2.0 class and protocol attributes are parsed both + in Objective-C and Objective-C++, but are ignored.
  • +
+ +

Runtime Library (libobjc)

+ +
    +
  • The GNU Objective-C runtime library now defines the macro + __GNU_LIBOBJC__ (with a value that is increased at + every release where there is any change to the API) in + objc/objc.h making it easy to determine if the GNU + Objective-C runtime library is being used, and if so, which + version. Previous versions of the GNU Objective-C library (and + other Objective-C runtime libraries such as the Apple one) do not + define this macro.
  • + +
  • A new Objective-C 2.0 API, almost identical to the one + implemented by the Apple Objective-C runtime, has been implemented + in the GNU Objective-C runtime library. The new API hides the + internals of most runtime structures but provides a more extensive + set of functions to operate on them. It is much easier, for + example, to create or modify classes at runtime. The new API also + makes it easier to port software from Apple to GNU as almost no + changes should be required. The old API is still supported for + backwards compatibility; including the old + objc/objc-api.h header file automatically selects the + old API, while including the new objc/runtime.h + header file automatically selects the new API. Support for the + old API is being phased out and upgrading the software to use the + new API is strongly recommended. To check for the availability of + the new API, the __GNU_LIBOBJC_ macro can be used as + older versions of the GNU Objective-C library, which do not + support the new API, do not define such a macro.
  • + +
  • Runtime support for @synchronized has been added + to the runtime.
  • + +
  • Runtime support for Objective-C 2.0 synthesized property + accessors has been added to the runtime.
  • + +
  • Runtime support for Objective-C 2.0 fast enumeration has been + added to the runtime.
  • +
+

New Targets and Target Specific Improvements

IA-32/x86-64