wok-next annotate ucl/stuff/patches/04-Static-assert.patch @ rev 20663
Fix web site for the Shimmer Project themes
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Thu May 10 22:58:32 2018 +0300 (2018-05-10) |
parents | |
children |
rev | line source |
---|---|
al@19663 | 1 From: Robert Luberda <robert@debian.org> |
al@19663 | 2 Date: Sat, 2 Jul 2016 22:23:20 +0200 |
al@19663 | 3 Subject: Switch to _Static_assert |
al@19663 | 4 |
al@19663 | 5 Use _Static_assert for compile-time assertion to fix |
al@19663 | 6 build failures with gcc-6 (closes: #811707) |
al@19663 | 7 --- |
al@19663 | 8 acc/acc_defs.h | 6 ++++++ |
al@19663 | 9 1 file changed, 6 insertions(+) |
al@19663 | 10 |
al@19663 | 11 diff --git a/acc/acc_defs.h b/acc/acc_defs.h |
al@19663 | 12 index 866b7bd..5ee3761 100644 |
al@19663 | 13 --- a/acc/acc_defs.h |
al@19663 | 14 +++ b/acc/acc_defs.h |
al@19663 | 15 @@ -87,6 +87,9 @@ |
al@19663 | 16 |
al@19663 | 17 /* This can be put into a header file but may get ignored by some compilers. */ |
al@19663 | 18 #if !defined(ACC_COMPILE_TIME_ASSERT_HEADER) |
al@19663 | 19 +# define ACC_COMPILE_TIME_ASSERT_HEADER(e) _Static_assert(e, #e); |
al@19663 | 20 +#endif |
al@19663 | 21 +#if !defined(ACC_COMPILE_TIME_ASSERT_HEADER) |
al@19663 | 22 # if (ACC_CC_AZTECC || ACC_CC_ZORTECHC) |
al@19663 | 23 # define ACC_COMPILE_TIME_ASSERT_HEADER(e) extern int __acc_cta[1-!(e)]; |
al@19663 | 24 # elif (ACC_CC_DMC || ACC_CC_SYMANTECC) |
al@19663 | 25 @@ -100,6 +103,9 @@ |
al@19663 | 26 |
al@19663 | 27 /* This must appear within a function body. */ |
al@19663 | 28 #if !defined(ACC_COMPILE_TIME_ASSERT) |
al@19663 | 29 +# define ACC_COMPILE_TIME_ASSERT(e) _Static_assert(e, #e); |
al@19663 | 30 +#endif |
al@19663 | 31 +#if !defined(ACC_COMPILE_TIME_ASSERT) |
al@19663 | 32 # if (ACC_CC_AZTECC) |
al@19663 | 33 # define ACC_COMPILE_TIME_ASSERT(e) {typedef int __acc_cta_t[1-!(e)];} |
al@19663 | 34 # elif (ACC_CC_DMC || ACC_CC_PACIFICC || ACC_CC_SYMANTECC || ACC_CC_ZORTECHC) |