Skip to content

Commit 26ea29d

Browse files
dcpleungdkalowsk
authored andcommitted
toolchain: xcc: define __deprecated only if not already defined
Some tests explicitly test for deprecated functions and they override the macro __deprecated to avoid compiler warnings. So, for xcc/xt-clang, only define __deprecated if it has not already been defined. Signed-off-by: Daniel Leung <daniel.leung@intel.com>
1 parent 1df5518 commit 26ea29d

File tree

1 file changed

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

1 file changed

+2
-0
lines changed

include/zephyr/toolchain/xcc.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@
1515
* XCC does not support using deprecated attribute in enum,
1616
* so just nullify it here to avoid compilation errors.
1717
*/
18+
#ifndef __deprecated
1819
#define __deprecated
20+
#endif
1921

2022
#define __in_section_unique(seg) \
2123
__attribute__((section("." STRINGIFY(seg) "." STRINGIFY(__COUNTER__))))

0 commit comments

Comments
 (0)