From ee47b2b67b5847815ee5e0da2974725784d5dd50 Mon Sep 17 00:00:00 2001 From: Furkan Onder Date: Fri, 14 Feb 2025 01:30:35 +0300 Subject: [PATCH] Exclude NetBSD from Clang fallthrough attribute in _Py_FALLTHROUGH macro --- Include/pyport.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Include/pyport.h b/Include/pyport.h index aabd094df54a74..c0b6ff6a965200 100644 --- a/Include/pyport.h +++ b/Include/pyport.h @@ -630,7 +630,7 @@ extern "C" { // style fallthrough attribute, not the GCC extension syntax used here, // and __has_attribute(fallthrough) evaluates to 1. #if _Py__has_attribute(fallthrough) && (!defined(__clang__) || \ - (!defined(__apple_build_version__) && __clang_major__ >= 10) || \ + ((!defined(__apple_build_version__) && !defined(__NetBSD__)) && __clang_major__ >= 10) || \ (defined(__apple_build_version__) && __clang_major__ >= 12)) # define _Py_FALLTHROUGH __attribute__((fallthrough)) #else