Skip to content

Commit

Permalink
The stringop-overread warning is not available on clang (#1789)
Browse files Browse the repository at this point in the history
  • Loading branch information
VeithMetro authored Nov 12, 2024
1 parent 3a82e15 commit d16cdd1
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Source/core/Portability.h
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,6 @@
#define DISABLE_WARNING_DEPRECATED_COPY PUSH_WARNING_ARG_("-Wdeprecated-copy")
#define DISABLE_WARNING_NON_VIRTUAL_DESTRUCTOR PUSH_WARNING_ARG_("-Wnon-virtual-dtor")
#define DISABLE_WARNING_TYPE_LIMITS PUSH_WARNING_ARG_("-Wtype-limits")
#define DISABLE_WARNING_STRING_OPERATION_OVERREAD PUSH_WARNING_ARG_("-Wstringop-overread")
#define DISABLE_WARNING_PEDANTIC PUSH_WARNING_ARG_("-Wpedantic")
#define DISABLE_WARNING_OVERLOADED_VIRTUALS PUSH_WARNING_ARG_("-Woverloaded-virtual")
#define DISABLE_WARNING_CONVERSION_TO_GREATERSIZE PUSH_WARNING_ARG_("-Wint-to-pointer-cast")
Expand All @@ -229,6 +228,13 @@
#define DISABLE_WARNING_FREE_NONHEAP_OBJECT PUSH_WARNING_ARG_("-Wfree-nonheap-object")
#define DISABLE_WARNING_ARRAY_BOUNDS PUSH_WARNING_ARG_("-Warray-bounds")
#endif

#if !(defined(__clang__)) && (__GNUC__ >= 4)
#define DISABLE_WARNING_STRING_OPERATION_OVERREAD PUSH_WARNING_ARG_("-Wstringop-overread")
#else
#define DISABLE_WARNING_STRING_OPERATION_OVERREAD
#endif

#endif

#if defined WIN32 || defined _WINDOWS
Expand Down

0 comments on commit d16cdd1

Please sign in to comment.