]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/doc/gcc/gnu-objective-c-features/compatibilityalias.rst
sphinx: add missing trailing newline
[thirdparty/gcc.git] / gcc / doc / gcc / gnu-objective-c-features / compatibilityalias.rst
CommitLineData
c63539ff
ML
1..
2 Copyright 1988-2022 Free Software Foundation, Inc.
3 This is part of the GCC manual.
4 For copying conditions, see the copyright.rst file.
5
6.. _compatibility_alias:
7
8compatibility_alias
9*******************
10
11The keyword ``@compatibility_alias`` allows you to define a class name
12as equivalent to another class name. For example:
13
14.. code-block:: objective-c
15
16 @compatibility_alias WOApplication GSWApplication;
17
18tells the compiler that each time it encounters ``WOApplication`` as
19a class name, it should replace it with ``GSWApplication`` (that is,
20``WOApplication`` is just an alias for ``GSWApplication``).
21
22There are some constraints on how this can be used---
23
24* ``WOApplication`` (the alias) must not be an existing class;
25
3ed1b4ce 26* ``GSWApplication`` (the real class) must be an existing class.