]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-128902: Fix check for fallthrough attribute support (#128903)
authorJoshua Root <jmr@macports.org>
Wed, 22 Jan 2025 09:25:30 +0000 (20:25 +1100)
committerGitHub <noreply@github.com>
Wed, 22 Jan 2025 09:25:30 +0000 (04:25 -0500)
commitedf803345a5c57c38fca3850386530e30b397eca
tree85a512eb7ac0795a05917b48ddf2f351fe1da922
parent86c1a60d5a28cfb51f8843b307f8969c40e3bbec
gh-128902: Fix check for fallthrough attribute support (#128903)

Clang versions prior to 10 (which corresponds to Apple Clang 12) do not
support the GCC extension syntax __attribute__((fallthrough)), but do
evaluate __has_attribute(fallthrough) to 1 because they support the
C++11 style syntax [[fallthrough]]. The only way to tell if the GCC
style syntax is supported is thus to check the clang version.

Ref: https://github.com/llvm/llvm-project/commit/1e0affb6e564b7361b0aadb38805f26deff4ecfc
Include/pyport.h
Misc/NEWS.d/next/Build/2025-01-16-03-35-37.gh-issue-128902.Dt7xtV.rst [new file with mode: 0644]