diff options
author | Joshua Root <jmr@macports.org> | 2023-04-05 15:09:19 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-05 15:09:19 (GMT) |
commit | 96e1901a59ed3bb6188743d60395666969a3ba42 (patch) | |
tree | 853592ba45df1fd29389ad44cd98cf25eb7a1a44 /Misc/NEWS.d | |
parent | fdd0fff277a55c010a4da0a7af0e986e38560545 (diff) | |
download | cpython-96e1901a59ed3bb6188743d60395666969a3ba42.zip cpython-96e1901a59ed3bb6188743d60395666969a3ba42.tar.gz cpython-96e1901a59ed3bb6188743d60395666969a3ba42.tar.bz2 |
gh-99069: Consolidate checks for static_assert (#94766)
Several platforms don't define the static_assert macro despite having
compiler support for the _Static_assert keyword. The macro needs to be
defined since it is used unconditionally in the Python code. So it
should always be safe to define it if undefined and not in C++11 (or
later) mode.
Hence, remove the checks for particular platforms or libc versions,
and just define static_assert anytime it needs to be defined but isn't.
That way, all platforms that need the fix will get it, regardless of
whether someone specifically thought of them.
Also document that certain macOS versions are among the platforms that
need this.
The C2x draft (currently expected to become C23) makes static_assert
a keyword to match C++. So only define the macro for up to C17.
Co-authored-by: Victor Stinner <vstinner@python.org>
Diffstat (limited to 'Misc/NEWS.d')
-rw-r--r-- | Misc/NEWS.d/next/Build/2023-02-11-05-31-05.gh-issue-99069.X4LDvY.rst | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Build/2023-02-11-05-31-05.gh-issue-99069.X4LDvY.rst b/Misc/NEWS.d/next/Build/2023-02-11-05-31-05.gh-issue-99069.X4LDvY.rst new file mode 100644 index 0000000..ae9b4d5 --- /dev/null +++ b/Misc/NEWS.d/next/Build/2023-02-11-05-31-05.gh-issue-99069.X4LDvY.rst @@ -0,0 +1 @@ +Extended workaround defining ``static_assert`` when missing from the libc headers to all clang and gcc builds. In particular, this fixes building on macOS <= 10.10. |