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