From 0c6782999ba92642542bd7eeba14e3f2812c6843 Mon Sep 17 00:00:00 2001 From: Sean McBride Date: Sat, 4 May 2024 11:06:51 -0400 Subject: [PATCH] COMP: restored old spelling of CLANG_SUPPRESS_Wfloat_equal Brought back #define CLANG_SUPPRESS_Wfloat_equal for compatibility with third party code using this as public API. While here, also prefixed some other defines with ITK to indicate they are from ITK. --- Modules/Core/Common/include/itkMacro.h | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/Modules/Core/Common/include/itkMacro.h b/Modules/Core/Common/include/itkMacro.h index 031a43e6e04..cc3e2622890 100644 --- a/Modules/Core/Common/include/itkMacro.h +++ b/Modules/Core/Common/include/itkMacro.h @@ -118,13 +118,19 @@ namespace itk // For Clang only (and not GCC): #if defined(__clang__) && defined(__has_warning) -# define CLANG_PRAGMA_PUSH ITK_PRAGMA(clang diagnostic push) -# define CLANG_PRAGMA_POP ITK_PRAGMA(clang diagnostic pop) +# define ITK_CLANG_PRAGMA_PUSH ITK_PRAGMA(clang diagnostic push) +# define ITK_CLANG_PRAGMA_POP ITK_PRAGMA(clang diagnostic pop) #else -# define CLANG_PRAGMA_PUSH -# define CLANG_PRAGMA_POP +# define ITK_CLANG_PRAGMA_PUSH +# define ITK_CLANG_PRAGMA_POP #endif +// These were not intended as public API, but some code was nevertheless using them. +// Support the pre ITK 5.4 spelling for compatibility. +#define CLANG_PRAGMA_PUSH ITK_CLANG_PRAGMA_PUSH +#define CLANG_PRAGMA_POP ITK_CLANG_PRAGMA_POP +#define CLANG_SUPPRESS_Wfloat_equal ITK_GCC_SUPPRESS_Wfloat_equal + #if !defined(ITK_LEGACY_REMOVE) // Issue warning if deprecated preprocessor flag is used. # define CLANG_SUPPRESS_Wcpp14_extensions \