From 36d8116587468f63829908af50fb84acb571a60c Mon Sep 17 00:00:00 2001 From: Dmitrii Zarukin Date: Mon, 28 Apr 2025 21:37:19 -0700 Subject: [PATCH 1/2] src: ittnotify: ittnotify_static: resolve Wundef hits --- src/ittnotify/ittnotify_static.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ittnotify/ittnotify_static.c b/src/ittnotify/ittnotify_static.c index 83b0dc1b..df5316d2 100644 --- a/src/ittnotify/ittnotify_static.c +++ b/src/ittnotify/ittnotify_static.c @@ -56,7 +56,7 @@ static const char api_version[] = API_VERSION "\0\n@(#) $Revision$\n"; #endif #ifndef ITT_ATTRIBUTE_FALLTHROUGH -#if (HAS_CPP_ATTR(fallthrough) || HAS_C_ATTR(fallthrough)) && (__cplusplus >= 201703L || _MSVC_LANG >= 201703L) +#if (HAS_CPP_ATTR(fallthrough) || HAS_C_ATTR(fallthrough)) && ((defined(__cplusplus) && __cplusplus >= 201703L) || (defined(_MSVC_LANG) && _MSVC_LANG >= 201703L)) #define ITT_ATTRIBUTE_FALLTHROUGH [[fallthrough]] #elif HAS_CPP_ATTR(gnu::fallthrough) #define ITT_ATTRIBUTE_FALLTHROUGH [[gnu::fallthrough]] From 8454cb305084dc5b72ff971abaf13492f6ae69b1 Mon Sep 17 00:00:00 2001 From: Evgeny Parshutin Date: Tue, 29 Apr 2025 13:10:09 +0200 Subject: [PATCH 2/2] src: ittnotify: ittnotify_static: resolve Wundef hit with __INTEL_COMPILER marco --- src/ittnotify/ittnotify_static.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ittnotify/ittnotify_static.c b/src/ittnotify/ittnotify_static.c index df5316d2..f78adafb 100644 --- a/src/ittnotify/ittnotify_static.c +++ b/src/ittnotify/ittnotify_static.c @@ -62,7 +62,7 @@ static const char api_version[] = API_VERSION "\0\n@(#) $Revision$\n"; #define ITT_ATTRIBUTE_FALLTHROUGH [[gnu::fallthrough]] #elif HAS_CPP_ATTR(clang::fallthrough) #define ITT_ATTRIBUTE_FALLTHROUGH [[clang::fallthrough]] -#elif HAS_GNU_ATTR(fallthrough) && !__INTEL_COMPILER +#elif HAS_GNU_ATTR(fallthrough) && !defined(__INTEL_COMPILER) #define ITT_ATTRIBUTE_FALLTHROUGH __attribute__((fallthrough)) #else #define ITT_ATTRIBUTE_FALLTHROUGH