File tree 3 files changed +14
-18
lines changed
3 files changed +14
-18
lines changed Original file line number Diff line number Diff line change @@ -137,10 +137,6 @@ PassManager *jl_globalPM;
137
137
#define AddrSpaceCastInst BitCastInst
138
138
#endif
139
139
140
- #if !defined(_COMPILER_MICROSOFT_) && __cplusplus < 201103L && !defined(static_assert)
141
- # define static_assert (...)
142
- #endif
143
-
144
140
extern " C" {
145
141
146
142
#include " builtin_proto.h"
Original file line number Diff line number Diff line change 28
28
#define write _write
29
29
#endif
30
30
31
- #ifndef static_assert
32
- # ifndef __cplusplus
33
- # define static_assert (...)
34
- // Remove the following gcc special handling when we officially requires
35
- // gcc 4.7 (for c++11) and -std=gnu11
36
- # ifdef __GNUC__
37
- # if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6 )
38
- # undef static_assert
39
- # define static_assert _Static_assert
40
- # endif
41
- # endif
42
- # endif
43
- #endif
44
-
45
31
#ifdef __cplusplus
46
32
#include <cstring>
47
33
extern "C" {
Original file line number Diff line number Diff line change 26
26
#endif
27
27
#endif
28
28
29
+ // Remove when C11 is required for C code.
30
+ #ifndef static_assert
31
+ # ifndef __cplusplus
32
+ // C11 should already have `static_assert` from `<assert.h>` so there's no need
33
+ // to check C version.
34
+ # ifdef __GNUC__
35
+ # define static_assert _Static_assert
36
+ # else
37
+ # define static_assert (...)
38
+ # endif
39
+ # endif
40
+ // For C++, C++11 or MSVC is required. Both provide `static_assert`.
41
+ #endif
42
+
29
43
#ifdef __cplusplus
30
44
extern "C" {
31
45
#endif
You can’t perform that action at this time.
0 commit comments