Skip to content

Commit 8e84529

Browse files
authored
Merge pull request hathach#1345 from alexandre-perrin/iar-cpp-verify-static
Fix CPP compilation with IAR
2 parents c9b0fbc + 81e3347 commit 8e84529

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/common/tusb_compiler.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,10 @@
5151
#endif
5252

5353
// Compile-time Assert
54-
#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L
55-
#define TU_VERIFY_STATIC _Static_assert
56-
#elif defined (__cplusplus) && __cplusplus >= 201103L
54+
#if defined (__cplusplus) && __cplusplus >= 201103L
5755
#define TU_VERIFY_STATIC static_assert
56+
#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L
57+
#define TU_VERIFY_STATIC _Static_assert
5858
#elif defined(__CCRX__)
5959
#define TU_VERIFY_STATIC(const_expr, _mess) typedef char TU_XSTRCAT(Line, __LINE__)[(const_expr) ? 1 : 0];
6060
#else

0 commit comments

Comments
 (0)