From da4f84a4160fcd60cdcb917f786407db07d9aa99 Mon Sep 17 00:00:00 2001 From: Jeroen Bakker Date: Mon, 27 May 2024 10:30:54 +0200 Subject: [PATCH] Fix: Reduce compilation warnings Reduces compilation warnings on - clang - GCC < 14 - MSVC Pull Request: https://projects.blender.org/blender/blender/pulls/122298 --- source/blender/gpu/vulkan/vk_resource_tracker.hh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/source/blender/gpu/vulkan/vk_resource_tracker.hh b/source/blender/gpu/vulkan/vk_resource_tracker.hh index da0e45f956d..ac0f883bab7 100644 --- a/source/blender/gpu/vulkan/vk_resource_tracker.hh +++ b/source/blender/gpu/vulkan/vk_resource_tracker.hh @@ -17,10 +17,12 @@ namespace blender::gpu { class VKContext; class VKCommandBuffers; -#pragma GCC diagnostic push +#if (defined(__GNUC__) && __GNUC__ >= 14 && !defined(__clang__)) +# pragma GCC diagnostic push /* CPP20 compiler warnings in GCC14+. * Must be resolved before upgrading to a newer C++, avoid noisy warnings for now. */ -#pragma GCC diagnostic ignored "-Wtemplate-id-cdtor" +# pragma GCC diagnostic ignored "-Wtemplate-id-cdtor" +#endif /** * In vulkan multiple commands can be in flight simultaneously. @@ -188,6 +190,8 @@ template class VKResourceTracker : NonCopyable { } }; -#pragma GCC diagnostic pop +#if (defined(__GNUC__) && __GNUC__ >= 14 && !defined(__clang__)) +# pragma GCC diagnostic pop +#endif } // namespace blender::gpu