summaryrefslogtreecommitdiff
path: root/libobjc
diff options
context:
space:
mode:
authorovidiu <ovidiu@138bc75d-0d04-0410-961f-82ee72b054a4>2001-02-28 17:16:17 +0000
committerovidiu <ovidiu@138bc75d-0d04-0410-961f-82ee72b054a4>2001-02-28 17:16:17 +0000
commitdcd9df6c74163686958d4b45af24c00e0c76f2d6 (patch)
treee367b54b35a48887cfdf5d515829348a074562dd /libobjc
parent6baea3be41b27b995a77c63e30cb94ddd6073196 (diff)
downloadgcc-dcd9df6c74163686958d4b45af24c00e0c76f2d6.tar.gz
Document the @compatibility_alias compiler directive (description from
Nicola Pero <n.pero@mi.flashnet.it>). git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@40125 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libobjc')
-rw-r--r--libobjc/objc-features.texi34
1 files changed, 32 insertions, 2 deletions
diff --git a/libobjc/objc-features.texi b/libobjc/objc-features.texi
index 9575e55b906..425f872ad33 100644
--- a/libobjc/objc-features.texi
+++ b/libobjc/objc-features.texi
@@ -21,6 +21,7 @@ comments about this document to Ovidiu Predescu
* Type encoding::
* Garbage Collection::
* Constant string objects::
+* compatibility_alias::
@end menu
@node Executing code before main, Type encoding, Top, Top
@@ -386,7 +387,7 @@ specifier to the string type description of the instance variable named
as argument.
@c =========================================================================
-@node Constant string objects, , Garbage Collection, Top
+@node Constant string objects, compatibility_alias , Garbage Collection, Top
@comment node-name, next, previous, up
@section Constant string objects
@@ -430,5 +431,34 @@ as argument to this option. It is possible to have multiple compilation
units referring to different constant string classes, neither the
compiler nor the linker impose any restrictions in doing this.
-@bye
+@c =========================================================================
+@node compatibility_alias, , Constant string objects, Top
+@comment node-name, next, previous, up
+@section compatibility_alias
+
+This is a feature of the Objective-C compiler rather than of the
+runtime, anyway since it is documented nowhere and its existence was
+forgotten, we are documenting it here.
+
+The keyword @code{@@compatibility_alias} allows you to define a class name
+as equivalent to another class name. For example:
+
+@example
+@@compatibility_alias WOApplication GSWApplication;
+@end example
+tells the compiler that each time it encounters @code{WOApplication} as
+a class name, it should replace it with @code{GSWApplication} (that is,
+@code{WOApplication} is just an alias for @code{GSWApplication}).
+
+There are some constraints on how this can be used -
+
+@itemize @bullet
+
+@item @code{WOApplication} (the alias) must not be an existing class;
+
+@item @code{GSWApplication} (the real class) must be an existing class.
+
+@end itemize
+
+@bye