oneapi-src / oneCCL

oneAPI Collective Communications Library (oneCCL)
https://oneapi-src.github.io/oneCCL
Other
188 stars 67 forks source link

oneCCL doesn't compile with -Werror due to -Wsuggest-override in include/oneapi/ccl/exception.hpp #44

Closed XapaJIaMnu closed 3 years ago

XapaJIaMnu commented 3 years ago

Tittle sums it up, here's a patch:

diff --git a/include/oneapi/ccl/exception.hpp b/include/oneapi/ccl/exception.hpp
index a5d03b4..6de6271 100644
--- a/include/oneapi/ccl/exception.hpp
+++ b/include/oneapi/ccl/exception.hpp
@@ -44,7 +44,7 @@ public:
         msg = std::string("oneCCL: ") + std::string(info);
     }

-    const char *what() const noexcept {
+    const char *what() const noexcept override {
         return msg.c_str();
     }
 };
mshiryaev commented 3 years ago

@XapaJIaMnu - thanks, just wonder what compiler you used to get this warning? So we probably can add it into CI.

XapaJIaMnu commented 3 years ago

gcc 8.4.0, the project was built as a submodule (not sure if that makes a difference)

alex-anenkov commented 3 years ago

Fixed https://github.com/oneapi-src/oneCCL/commit/34434ae2f8a68953b431c1d5eae0c8804b8171ab @mshiryaev