4.5.4. __attribute__((deprecated))

The deprecated variable attribute enables the declaration of a deprecated variable without any warnings or errors being issued by the compiler. However, any access to a deprecated variable creates a warning but still compiles. The warning gives the location where the variable is used and the location where it is defined. This helps you to determine why a particular definition is deprecated.


This variable attribute is a GNU compiler extension that is supported by the ARM compiler.


extern int Variable_Attributes_deprecated_0 __attribute__ ((deprecated));
extern int Variable_Attributes_deprecated_1 __attribute__ ((deprecated));

void Variable_Attributes_deprecated_2()

Compiling this example generates two warning messages.

Copyright © 2007, 2010 ARM Limited. All rights reserved.ARM DUI 0348A