Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add more explanation of __STDC_VERSION__ check
  • Loading branch information
jmroot committed Dec 2, 2022
commit ce67d71353af538122eea1e69cb7021b77fcfdcc
1 change: 1 addition & 0 deletions Include/pymacro.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
// MSVC makes static_assert a keyword, contrary to the C standard.
//
// In C++ 11 static_assert is a keyword, redefining is undefined behaviour.
// So only define if building as C, not C++.
#if !defined(static_assert) && defined(__GNUC__) \
&& defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L
# define static_assert _Static_assert
Expand Down