|
|
1 | TODO: |
|
|
2 | 08:30:06 <b_jonas> I think it could be worth to add a macro that works like alignof or _Alignof on sane |
|
|
3 | compilers, and like __alignof on MS compilers that support it, see |
|
|
4 | http://msdn.microsoft.com/en-us/library/45t0s5f4.aspx |
|
|
5 | 08:30:24 <b_jonas> even if you can't support it on all the old compilers |
|
|
6 | 08:31:17 <b_jonas> I'd also like a macro for alignas, but sadly, that seems impossible in general, because |
|
|
7 | the MS compiler only has some half-attempt to do something similar but with different and |
|
|
8 | more broken semantics, see http://msdn.microsoft.com/en-us/library/83ythb65.aspx |
|
|
9 | 08:31:35 <b_jonas> but I wonder if some special case could still be worth to support |
|
|
10 | 08:32:23 <b_jonas> probably not, because it would just account to making a union with a highly aligned type, |
|
|
11 | which is something I can do on any compiler portably |
|
|
12 | |
|
|
13 | TODO: #define ECB_IS_INTEGRAL(x) !((1 ? 1 : (x)) / 2) |
|
|
14 | #define ECB_IS_INTEGRAL(x) (sizeof ((x) + 1.0f) != sizeof((x) + 1ULL)) |
|
|
15 | |
|
|
16 | TODO: define ECB_STDFP if __STDC_IEC_559__? |
|
|
17 | |
|
|
18 | TODO: https://gustedt.wordpress.com/2010/06/08/detect-empty-macro-arguments/ |
|
|
19 | |
1 | implement is_constant for c11: https://gustedt.wordpress.com/2013/08/22/testing-compile-time-constness-and-null-pointers-with-c11s-_generic/ |
20 | implement is_constant for c11: https://gustedt.wordpress.com/2013/08/22/testing-compile-time-constness-and-null-pointers-with-c11s-_generic/ |
2 | |
21 | |
3 | #ifdef _MSC_VER |
22 | #ifdef _MSC_VER |
4 | |
23 | |
5 | #include <stdlib.h> |
24 | #include <stdlib.h> |