diff options
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/c-family/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/c-family/c.opt | 8 | ||||
-rw-r--r-- | gcc/doc/invoke.texi | 27 |
4 files changed, 45 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 40d80410b8e..26a0c96f366 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2011-02-17 Nicola Pero <nicola.pero@meta-innovation.com> + + * doc/invoke.texi (fobjc-abi-version): Documented. + (fobjc-nilcheck): Documented. + (fno-nil-receiver): Updated documentation to refer to the NeXT ABI + version. + 2011-02-17 Joseph Myers <joseph@codesourcery.com> PR driver/47390 diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog index ec0acab6ee1..fece41158c1 100644 --- a/gcc/c-family/ChangeLog +++ b/gcc/c-family/ChangeLog @@ -1,3 +1,8 @@ +2011-02-17 Iain Sandoe <iains@gcc.gnu.org> + + * c.opt (fobjc-abi-version=) New. + (fobjc-nilcheck): New. + 2011-02-03 Nathan Froyd <froydnj@codesourcery.com> PR c++/46890 diff --git a/gcc/c-family/c.opt b/gcc/c-family/c.opt index b0d9e5bed89..bb928fa9146 100644 --- a/gcc/c-family/c.opt +++ b/gcc/c-family/c.opt @@ -853,6 +853,10 @@ fnothrow-opt C++ ObjC++ Optimization Var(flag_nothrow_opt) Treat a throw() exception specification as noexcept to improve code size +fobjc-abi-version= +ObjC ObjC++ Joined Report RejectNegative UInteger Var(flag_objc_abi) +Specify which ABI to use for Objective-C family code and meta-data generation. + ; Generate special '- .cxx_construct' and '- .cxx_destruct' methods ; to initialize any non-POD ivars in Objective-C++ classes. fobjc-call-cxx-cdtors @@ -873,6 +877,10 @@ fobjc-gc ObjC ObjC++ Var(flag_objc_gc) Enable garbage collection (GC) in Objective-C/Objective-C++ programs +fobjc-nilcheck +ObjC ObjC++ Var(flag_objc_nilcheck,1) +Enable inline checks for nil receivers with the NeXT runtime and ABI version 2. + ; Nonzero means that we generate NeXT setjmp based exceptions. fobjc-sjlj-exceptions ObjC ObjC++ Var(flag_objc_sjlj_exceptions) Init(-1) diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index a916e4ea141..5295c39b09c 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -208,10 +208,12 @@ Objective-C and Objective-C++ Dialects}. @gccoptlist{-fconstant-string-class=@var{class-name} @gol -fgnu-runtime -fnext-runtime @gol -fno-nil-receivers @gol +-fobjc-abi-version=@var{n} @gol -fobjc-call-cxx-cdtors @gol -fobjc-direct-dispatch @gol -fobjc-exceptions @gol -fobjc-gc @gol +-fobjc-nilcheck @gol -fobjc-std=objc1 @gol -freplace-objc-classes @gol -fzero-link @gol @@ -2555,8 +2557,19 @@ used. Assume that all Objective-C message dispatches (@code{[receiver message:arg]}) in this translation unit ensure that the receiver is not @code{nil}. This allows for more efficient entry points in the -runtime to be used. Currently, this option is only available in -conjunction with the NeXT runtime on Mac OS X 10.3 and later. +runtime to be used. This option is only available in conjunction with +the NeXT runtime and ABI version 0 or 1. + +@item -fobjc-abi-version=@var{n} +@opindex fobjc-abi-version +Use version @var{n} of the Objective-C ABI for the selected runtime. +This option is currently supported only for the NeXT runtime. In that +case, Version 0 is the traditional (32-bit) ABI without support for +properties and other Objective-C 2.0 additions. Version 1 is the +traditional (32-bit) ABI with support for properties and other +Objective-C 2.0 additions. Version 2 is the modern (64-bit) ABI. If +nothing is specified, the default is Version 0 on 32-bit target +machines, and Version 2 on 64-bit target machines. @item -fobjc-call-cxx-cdtors @opindex fobjc-call-cxx-cdtors @@ -2605,6 +2618,16 @@ programs. This option is only available with the NeXT runtime; the GNU runtime has a different garbage collection implementation that does not require special compiler flags. +@item -fobjc-nilcheck +@opindex fobjc-nilcheck +For the NeXT runtime with version 2 of the ABI, check for a nil +receiver in method invocations before doing the actual method call. +This is the default and can be disabled using +@option{-fno-objc-nilcheck}. Class methods and super calls are never +checked for nil in this way no matter what this flag is set to. +Currently this flag does nothing when the GNU runtime, or an older +version of the NeXT runtime ABI, is used. + @item -fobjc-std=objc1 @opindex fobjc-std Conform to the language syntax of Objective-C 1.0, the language |