Skip to content

Commit defd3b9

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 82655b6 commit defd3b9

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
@@ -187,6 +187,11 @@ do { \
187187
#define __deprecated __attribute__((deprecated))
188188
#endif
189189

190+
#ifndef __deprecated_version
191+
#define __deprecated_version(version) \
192+
__attribute__((deprecated("planned removal in v" #version)))
193+
#endif
194+
190195
#define FUNC_NO_STACK_PROTECTOR _Pragma("no_stack_protect")
191196

192197
#ifndef __attribute_const__

0 commit comments

Comments
 (0)