]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib/macros.h - protect old compilers from use of modern features
authorPhil Carmody <phil@dovecot.fi>
Mon, 5 Dec 2016 15:29:08 +0000 (17:29 +0200)
committerTimo Sirainen <timo.sirainen@dovecot.fi>
Thu, 8 Dec 2016 17:54:56 +0000 (19:54 +0200)
no_sanitize(integer) is not in 3.5 (debian stable's version), but is
documented in 3.9. Exactly when it appeared isn't immediately obvious.

Signed-off-by: Phil Carmody <phil@dovecot.fi>
src/lib/macros.h

index 566c176d19e4fa59d300db436e2fae88b7caad26..45af0b3b8a1c827ae61bec5ce11c4c73cd2e7ce9 100644 (file)
 #  define likely(expr) expr
 #endif
 
-#if defined(__clang__)
+#if defined(__clang__) && ((__clang_major__ > 4) || (__clang_major__ == 3 && __clang_minor__ >= 9))
 #  define ATTR_UNSIGNED_WRAPS __attribute__((no_sanitize("integer")))
 #else
 #  define ATTR_UNSIGNED_WRAPS