Skip to content

Commit e53f988

Browse files
committed
toolchain: gcc: Add the __deprecated_version macro
Add the `__deprecated_version` macro to print version information when deprecation warnings are triggered. Signed-off-by: James Roy <rruuaanng@outlook.com>
1 parent 726fd18 commit e53f988

File tree

1 file changed

+5
-0
lines changed
  • include/zephyr/toolchain

1 file changed

+5
-0
lines changed

include/zephyr/toolchain/gcc.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,11 @@ do { \
267267
*/
268268
#endif
269269

270+
#ifndef __deprecated_version
271+
#define __deprecated(version) \
272+
__attribute__((deprecated("planned removal in v" #version)))
273+
#endif
274+
270275
#ifndef __attribute_const__
271276
#define __attribute_const__ __attribute__((__const__))
272277
#endif

0 commit comments

Comments
 (0)