Skip to content

Commit 82655b6

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 66acb36 commit 82655b6

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
@@ -286,6 +286,11 @@ do { \
286286
*/
287287
#endif
288288

289+
#ifndef __deprecated_version
290+
#define __deprecated_version(version) \
291+
__attribute__((deprecated("planned removal in v" #version)))
292+
#endif
293+
289294
#ifndef __attribute_const__
290295
#define __attribute_const__ __attribute__((__const__))
291296
#endif

0 commit comments

Comments
 (0)