25.4.12 Indicating Antiquated Objects

The __deprecate specifier can be used to indicate that an object has limited longevity and should not be used in new designs. It is commonly used by the compiler vendor to indicate that compiler extensions or features can become obsolete, or that better features have been developed and should be used in preference.

Use the native keywords discussed in the Differences section to look up information on the semantics of this specifier.

Example

The following shows a function that uses the __deprecate keyword.

void __deprecate getValue(int mode)
{
//...
}

Differences

No deprecate feature was implemented on 8-bit compilers.

The 16- and 32-bit compilers have used the deprecated attribute (note the different spelling) to indicate that objects should be avoided, if possible.

Migration to the CCI

For 16- and 32-bit compilers, change any occurrence of the deprecated attribute to __deprecate, for example, from:

int __attribute__(deprecated) intMask;

to:

int __deprecate intMask;

Caveats

None.