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 <peter.bigot@nordicsemi.no>
This commit is contained in:
Peter Bigot 2020-01-31 05:40:38 -06:00 committed by Andrew Boie
commit bfa3eb17b2

View file

@ -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 */