[3.11] gh-99069: Consolidate checks for static_assert (GH-94766) by miss-islington · Pull Request #103282 · python/cpython
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. (cherry picked from commit 96e1901) Co-authored-by: Joshua Root <jmr@macports.org> Co-authored-by: Victor Stinner <vstinner@python.org>
This was referenced
th0ma7 added a commit to SynoCommunity/spksrc that referenced this pull request
* python310: Update from version 3.10.11 to 3.10.12 * python311: Update from version 3.11.3 to 3.11.4 * cryptography: Update from version 40.0.2 to 41.0.1 * py310-311: Downgrade Pillow from 10.0.0 to 9.5.0 * py310-311: Numpy 1.25.x require c++17 * py311: Revert static_assert undefined fix GH-94766 This fix python/cpython#103282 actually breaks things using GCC 4.6.4 when enforcing c99. * py310-311: Rename requirement file to match greenlet versions * py310-311: (re)Disable testing all wheels * mariadb-connector-c: Update from version 3.3.4 to 3.3.5 * openssl3: Fix building on aarch64 on DSM 6.x * mariadb-connector-c: Fix build on armv5 (required -std=gnu99) * mariadb-connector-c: Fix is actually required for GCC < 5.0 * py310-311: Major bump to openssl3 * python311: (re)Disable testing all wheels * openssl3: Revert disabling of ASM for aarch64 in favor of #5809
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters