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.
6 .. _compatibility_alias:
11 The keyword ``@compatibility_alias`` allows you to define a class name
12 as equivalent to another class name. For example:
14 .. code-block:: objective-c
16 @compatibility_alias WOApplication GSWApplication;
18 tells the compiler that each time it encounters ``WOApplication`` as
19 a class name, it should replace it with ``GSWApplication`` (that is,
20 ``WOApplication`` is just an alias for ``GSWApplication``).
22 There are some constraints on how this can be used---
24 * ``WOApplication`` (the alias) must not be an existing class;
26 * ``GSWApplication`` (the real class) must be an existing class.