From d4bf78b28d13a175653c540bcffcb3098333a4e4 Mon Sep 17 00:00:00 2001 From: dance858 Date: Sun, 12 Jul 2026 07:00:42 -0700 Subject: [PATCH] Silence Apple Accelerate header warnings via system_header pragma Apple's Accelerate/LAPACK/Sparse headers (pulled in through ACCELERATE_NEW_LAPACK) trip a large, SDK-version-dependent set of -Wpedantic/GNU-extension warnings: _Nullable/_Nonnull nullability qualifiers, zero-arg variadic macros, extra semicolons, and more. On the Xcode SDK this floods the build with tens of thousands of warnings from headers we cannot fix. Mark the Accelerate include as a system header with `#pragma clang system_header` so all of its warnings are suppressed regardless of which flag or SDK version produces them, while our own code keeps full -Wpedantic strictness. cblas_wrapper.h contains nothing but the include, so the marker is effectively scoped to Accelerate. Co-Authored-By: Claude Opus 4.8 (1M context) --- include/utils/cblas_wrapper.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/utils/cblas_wrapper.h b/include/utils/cblas_wrapper.h index 392c3ba3..c3d35281 100644 --- a/include/utils/cblas_wrapper.h +++ b/include/utils/cblas_wrapper.h @@ -20,6 +20,14 @@ #ifdef __APPLE__ #define ACCELERATE_NEW_LAPACK +/* Apple's Accelerate/LAPACK/Sparse headers trip a large, SDK-dependent set + * of -Wpedantic/GNU-extension warnings (nullability qualifiers, zero-arg + * variadic macros, etc.) that we cannot fix and do not want in our build + * output. Treat everything included below as a system header so all of its + * warnings are suppressed, while our own code keeps full -Wpedantic + * strictness. This file contains nothing but the include, so the marker is + * effectively scoped to Accelerate. */ +#pragma clang system_header #include #else #include