From d852a973bbdd027b18c168f4735a7eda56b33898 Mon Sep 17 00:00:00 2001 From: Andrei Elovikov Date: Wed, 21 May 2025 12:57:30 -0700 Subject: [PATCH] [SYCL] Fix `-Werror=unused-but-set-variable` warning with old gcc Follow-up for https://github.com/intel/llvm/pull/18477. --- sycl/source/detail/device_impl.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sycl/source/detail/device_impl.hpp b/sycl/source/detail/device_impl.hpp index f091680af9d32..463c29a7c4360 100644 --- a/sycl/source/detail/device_impl.hpp +++ b/sycl/source/detail/device_impl.hpp @@ -503,7 +503,7 @@ class device_impl : public std::enable_shared_from_this { // descriptor first when defining the cache data member). For "CallOnce" // cache we want to be querying cached value so "false" is the right // template parameter for such delegation. - constexpr bool DependentFalse = InitializingCache && false; + [[maybe_unused]] constexpr bool DependentFalse = InitializingCache && false; if constexpr (decltype(MCache)::has() && !InitializingCache) { return MCache.get();