Skip to content

Commit

Permalink
Don't ignore GCC-specific warning under Clang
Browse files Browse the repository at this point in the history
Clang doesn't know `-Wnon-template-friend`.
  • Loading branch information
aaronmondal committed May 10, 2024
1 parent f11c8ca commit 2c8ca92
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions include/rmm/mr/device/pool_memory_resource.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,18 +75,19 @@ struct maybe_remove_property<PoolResource,
Upstream,
Property,
cuda::std::enable_if_t<!cuda::has_property<Upstream, Property>>> {
#ifdef __GNUC__ // GCC warns about compatibility issues with pre ISO C++ code
#if defined(__GNUC__) && !defined(__clang__) // GCC warns about compatibility
// issues with pre ISO C++ code
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wnon-template-friend"
#endif // __GNUC__
#endif // __GNUC__ and not __clang__
/**
* @brief Explicit removal of the friend function so we do not pretend to provide device
* accessible memory
*/
friend void get_property(const PoolResource&, Property) = delete;
#ifdef __GNUC__
#if defined(__GNUC__) && !defined(__clang__)
#pragma GCC diagnostic pop
#endif // __GNUC__
#endif // __GNUC__ and not __clang__
};
} // namespace detail

Expand Down

0 comments on commit 2c8ca92

Please sign in to comment.