From 79378cdbc8ee5c58de6f0a7b86eaead573593201 Mon Sep 17 00:00:00 2001 From: Christian Eltzschig Date: Tue, 20 Apr 2021 18:23:03 +0200 Subject: [PATCH] iox-#743 added missing underscores in macro __clang_major(__) Signed-off-by: Christian Eltzschig --- iceoryx_utils/include/iceoryx_utils/cxx/attributes.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/iceoryx_utils/include/iceoryx_utils/cxx/attributes.hpp b/iceoryx_utils/include/iceoryx_utils/cxx/attributes.hpp index 41eaffb384..46667975bf 100644 --- a/iceoryx_utils/include/iceoryx_utils/cxx/attributes.hpp +++ b/iceoryx_utils/include/iceoryx_utils/cxx/attributes.hpp @@ -35,7 +35,7 @@ namespace cxx // [[nodiscard]], [[gnu::warn_unused]] supported since gcc 4.8 (https://gcc.gnu.org/projects/cxx-status.html) /// [[nodiscard]], [[gnu::warn_unused]] supported since clang 3.9 (https://clang.llvm.org/cxx_status.html) /// activate keywords for gcc>=5 or clang>=4 -#if (defined(__GNUC__) && __GNUC__ >= 5) || (defined(__clang__) && __clang_major >= 4) +#if (defined(__GNUC__) && __GNUC__ >= 5) || (defined(__clang__) && __clang_major__ >= 4) #define IOX_NO_DISCARD [[nodiscard, gnu::warn_unused]] // NOLINT #else // On WIN32 we are using C++17 which makes the keyword [[nodiscard]] available @@ -52,7 +52,7 @@ namespace cxx // [[fallthrough]] supported since gcc 7 (https://gcc.gnu.org/projects/cxx-status.html) /// [[fallthrough]] supported since clang 3.9 (https://clang.llvm.org/cxx_status.html) /// activate keywords for gcc>=7 or clang>=4 -#if (defined(__GNUC__) && __GNUC__ >= 7) || (defined(__clang__) && __clang_major >= 4) +#if (defined(__GNUC__) && __GNUC__ >= 7) || (defined(__clang__) && __clang_major__ >= 4) #define IOX_FALLTHROUGH [[fallthrough]] // NOLINT #else // On WIN32 we are using C++17 which makes the keyword [[fallthrough]] available