Skip to content

Commit a682c12

Browse files
committed
toolchain: iar: 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 e53f988 commit a682c12

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

include/zephyr/toolchain/iar/iccarm.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,11 @@ do { \
185185
#define __deprecated __attribute__((deprecated))
186186
#endif
187187

188+
#ifndef __deprecated_version
189+
#define __deprecated(version) \
190+
__attribute__((deprecated("planned removal in v" #version)))
191+
#endif
192+
188193
#define FUNC_NO_STACK_PROTECTOR _Pragma("no_stack_protect")
189194

190195
#ifndef __attribute_const__

0 commit comments

Comments
 (0)