File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change 118
118
"We've reached an unreachable state. Anything is possible.\n" \
119
119
"The limits were in our heads all along. Follow your dreams.\n" \
120
120
"https://xkcd.com/2200")
121
- #elif defined(__GNUC__ ) || defined(__clang__ ) || defined(__INTEL_COMPILER )
121
+ #elif defined(__GNUC__ ) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5 ))
122
+ # define Py_UNREACHABLE () __builtin_unreachable()
123
+ #elif defined(__clang__ ) || defined(__INTEL_COMPILER )
122
124
# define Py_UNREACHABLE () __builtin_unreachable()
123
125
#elif defined(_MSC_VER )
124
126
# define Py_UNREACHABLE () __assume(0)
Original file line number Diff line number Diff line change
1
+ Update :c:macro: `Py_UNREACHABLE ` to use __builtin_unreachable() if only the
2
+ compiler is able to use it. Patch by Dong-hee Na.
You can’t perform that action at this time.
0 commit comments