From bfa3eb17b2d505096f13bceccae7e3807dccb7ec Mon Sep 17 00:00:00 2001 From: Peter Bigot Date: Fri, 31 Jan 2020 05:40:38 -0600 Subject: [PATCH] toolchain: gcc: respect existing deprecated macro define The __deprecated symbol can be pre-defined to avoid warnings of use of deprecated API in tests of that API. Enable that same feature for macros that are deprecated. Signed-off-by: Peter Bigot --- include/toolchain/gcc.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/toolchain/gcc.h b/include/toolchain/gcc.h index bc3baaf93d4..d02fda11fa1 100644 --- a/include/toolchain/gcc.h +++ b/include/toolchain/gcc.h @@ -209,7 +209,9 @@ do { \ /* Be *very* careful with this, you cannot filter out with -wno-deprecated, * which has implications for -Werror */ +#ifndef __DEPRECATED_MACRO #define __DEPRECATED_MACRO _Pragma("GCC warning \"Macro is deprecated\"") +#endif /* These macros allow having ARM asm functions callable from thumb */