Skip to content

Commit

Permalink
Workaround gcc warning on uninitialized PlatformUniformCudaHipRt
Browse files Browse the repository at this point in the history
  • Loading branch information
bernhardmgruber authored and j-stephan committed Sep 19, 2023
1 parent 9327701 commit 9f797da
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions include/alpaka/platform/PlatformUniformCudaHipRt.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@ namespace alpaka
template<typename TApi>
struct PlatformUniformCudaHipRt : concepts::Implements<ConceptPlatform, PlatformUniformCudaHipRt<TApi>>
{
# 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
Expand Down

0 comments on commit 9f797da

Please sign in to comment.