From 9f797da4bf4cac28b0986906ab2c24ed69d91715 Mon Sep 17 00:00:00 2001 From: Bernhard Manfred Gruber Date: Mon, 18 Sep 2023 18:03:44 +0200 Subject: [PATCH] Workaround gcc warning on uninitialized PlatformUniformCudaHipRt --- include/alpaka/platform/PlatformUniformCudaHipRt.hpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/alpaka/platform/PlatformUniformCudaHipRt.hpp b/include/alpaka/platform/PlatformUniformCudaHipRt.hpp index ffda2de2faab..9784f54520b2 100644 --- a/include/alpaka/platform/PlatformUniformCudaHipRt.hpp +++ b/include/alpaka/platform/PlatformUniformCudaHipRt.hpp @@ -28,6 +28,12 @@ namespace alpaka template struct PlatformUniformCudaHipRt : concepts::Implements> { +# if defined(BOOST_COMP_GNUC) && BOOST_COMP_GNUC >= BOOST_VERSION_NUMBER(11, 0, 0) \ + && BOOST_COMP_GNUC < BOOST_VERSION_NUMBER(12, 0, 0) + // This is a workaround for g++-11 bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96295 + // g++-11 complains in *all* places where a PlatformCpu is used, that it "may be used uninitialized" + char c = {}; +# endif }; namespace trait