Skip to content

Commit

Permalink
[fix] charconv: sanitizer suppression only for gcc8+
Browse files Browse the repository at this point in the history
  • Loading branch information
biojppm committed Jan 11, 2024
1 parent 0a21dfc commit cb4d743
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/c4/charconv.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -159,10 +159,14 @@
#if defined(__clang__)
#define C4_NO_UBSAN_IOVRFLW __attribute__((no_sanitize("signed-integer-overflow")))
#elif defined(__GNUC__)
#if __GNUC__ > 7
#define C4_NO_UBSAN_IOVRFLW __attribute__((no_sanitize("signed-integer-overflow")))
#else
#define C4_NO_UBSAN_IOVRFLW
#endif
#else
#define C4_NO_UBSAN_IOVRFLW
#endif


namespace c4 {
Expand Down

0 comments on commit cb4d743

Please sign in to comment.