Rev 26 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 26 | Rev 28 | ||
---|---|---|---|
Line 85... | Line 85... | ||
85 | // compile-time-assertions |
85 | // compile-time-assertions |
86 | ************************************************************************/ |
86 | ************************************************************************/ |
87 | 87 | ||
88 | /* This can be put into a header file but may get ignored by some compilers. */ |
88 | /* This can be put into a header file but may get ignored by some compilers. */ |
89 | #if !defined(ACC_COMPILE_TIME_ASSERT_HEADER) |
89 | #if !defined(ACC_COMPILE_TIME_ASSERT_HEADER) |
- | 90 | # if (__cplusplus >= 201103L) /* Pierre-Marie Baty -- (much cleaner) C11 addition */ |
|
- | 91 | # define ACC_COMPILE_TIME_ASSERT_HEADER(e) static_assert(e, #e); |
|
- | 92 | # elif (__STDC_VERSION__ >= 201112L) /* Pierre-Marie Baty -- (much cleaner) C11 addition */ |
|
- | 93 | # define ACC_COMPILE_TIME_ASSERT_HEADER(e) _Static_assert(e, #e); |
|
90 | # |
94 | # elif (ACC_CC_AZTECC || ACC_CC_ZORTECHC) |
91 | # define ACC_COMPILE_TIME_ASSERT_HEADER(e) extern int __acc_cta[1-!(e)]; |
95 | # define ACC_COMPILE_TIME_ASSERT_HEADER(e) extern int __acc_cta[1-!(e)]; |
92 | # elif (ACC_CC_DMC || ACC_CC_SYMANTECC) |
96 | # elif (ACC_CC_DMC || ACC_CC_SYMANTECC) |
93 | # define ACC_COMPILE_TIME_ASSERT_HEADER(e) extern int __acc_cta[1u-2*!(e)]; |
97 | # define ACC_COMPILE_TIME_ASSERT_HEADER(e) extern int __acc_cta[1u-2*!(e)]; |
94 | # elif (ACC_CC_TURBOC && (__TURBOC__ == 0x0295)) |
98 | # elif (ACC_CC_TURBOC && (__TURBOC__ == 0x0295)) |
95 | # define ACC_COMPILE_TIME_ASSERT_HEADER(e) extern int __acc_cta[1-!(e)]; |
99 | # define ACC_COMPILE_TIME_ASSERT_HEADER(e) extern int __acc_cta[1-!(e)]; |