Skip to content
Snippets Groups Projects
Commit 2e3e97bb authored by Simon Praetorius's avatar Simon Praetorius
Browse files

Disable bitwise operation warning in more files

parent 8dcff4a8
No related branches found
No related tags found
1 merge request!1160Disable warnings in clang properly
Pipeline #52924 passed
Pipeline: Dune Nightly Test

#52926

    ......@@ -182,12 +182,19 @@ namespace Dune {
    #if __GNUC__ >= 7
    # pragma GCC diagnostic push
    # pragma GCC diagnostic ignored "-Wbool-operation"
    #endif
    #ifdef __clang__
    # pragma clang diagnostic push
    # pragma clang diagnostic ignored "-Wbool-operation"
    #endif
    template<class U = T,
    class = std::void_t<decltype(~std::declval<const U&>())> >
    decltype(auto) operator~() const { return aligned<align>(~value_); }
    #if __GNUC__ >= 7
    # pragma GCC diagnostic pop
    #endif
    #ifdef __clang__
    # pragma clang diagnostic pop
    #endif
    template<class U = T,
    ......
    ......@@ -30,13 +30,12 @@ namespace Dune {
    * a bool (when instantiated for T=bool)
    */
    #ifdef __clang__
    #if __has_warning("-Wbitwise-instead-of-logical")
    # pragma clang diagnostic push
    # pragma clang diagnostic ignored "-Wbool-operation"
    # if __has_warning("-Wbitwise-instead-of-logical")
    # pragma clang diagnostic ignored "-Wbitwise-instead-of-logical"
    # endif
    # pragma clang diagnostic ignored "-Wbitwise-instead-of-logical"
    # define CLANG_WARNING_DISABLED
    #endif
    #endif
    /*
    * Introduce a simd pragma if OpenMP is available in standard version >= 4
    ......
    ......@@ -20,6 +20,17 @@ namespace Dune {
    # pragma GCC diagnostic push
    # pragma GCC diagnostic ignored "-Wbool-operation"
    # pragma GCC diagnostic ignored "-Wint-in-bool-context"
    # define GCC_WARNING_DISABLED
    #endif
    /*
    * silence warnings from Clang about using bitwise operands on
    * a bool (when instantiated for T=bool)
    */
    #ifdef __clang__
    # pragma clang diagnostic push
    # pragma clang diagnostic ignored "-Wbool-operation"
    # define CLANG_WARNING_DISABLED
    #endif
    //! Test suite for arithmetic types
    ......@@ -791,8 +802,14 @@ namespace Dune {
    }
    };
    #if __GNUC__ >= 7
    #ifdef CLANG_WARNING_DISABLED
    # pragma clang diagnostic pop
    # undef CLANG_WARNING_DISABLED
    #endif
    #ifdef GCC_WARNING_DISABLED
    # pragma GCC diagnostic pop
    # undef GCC_WARNING_DISABLED
    #endif
    } // namespace Dune
    ......
    0% Loading or .
    You are about to add 0 people to the discussion. Proceed with caution.
    Finish editing this message first!
    Please register or to comment