Skip to content

Commit

Permalink
COMP: restored old spelling of CLANG_SUPPRESS_Wfloat_equal
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
seanm authored and thewtex committed May 7, 2024
1 parent 9b8963e commit 0c67829
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions Modules/Core/Common/include/itkMacro.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down

0 comments on commit 0c67829

Please sign in to comment.