Skip to content

Commit c109eba

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 c109eba

File tree

1 file changed

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

1 file changed

+4
-0
lines changed

include/zephyr/toolchain/gcc.h

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

270+
#ifndef __deprecated_version
271+
#define __deprecated_version(version) __attribute__((deprecated(#version)))
272+
#endif
273+
270274
#ifndef __attribute_const__
271275
#define __attribute_const__ __attribute__((__const__))
272276
#endif

0 commit comments

Comments
 (0)