Commit e0185d4c authored by Andrew Boie's avatar Andrew Boie Committed by Anas Nashif
Browse files

toolchain: gcc: add __DEPRECATED_MACRO



Add a macro which signals to the compiler that use of the macro is
deprecated.

Example:

  #define FOO __DEPRECATED_MACRO bar

Defines FOO to 'bar' but emits a warning if used in code.

Cannot filter out with -Wno-deprecated, so be careful with -Werror.

Signed-off-by: default avatarAndrew Boie <andrew.p.boie@intel.com>
parent 2f28bf53
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -94,6 +94,11 @@ do { \
#define __weak __attribute__((__weak__))
#define __unused __attribute__((__unused__))

/* Be *very* careful with this, you cannot filter out with -wno-deprecated,
 * which has implications for -Werror
 */
#define __DEPRECATED_MACRO _Pragma("GCC warning \"Macro is deprecated\"")

/* These macros allow having ARM asm functions callable from thumb */

#if defined(_ASMLANGUAGE) && !defined(_LINKER)