[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20180608063441.8562-1-mbenes@suse.cz>
Date: Fri, 8 Jun 2018 08:34:41 +0200
From: Miroslav Benes <mbenes@...e.cz>
To: keescook@...omium.org
Cc: linux@...musvillemoes.dk, luc.vanoostenryck@...il.com,
linux-kernel@...r.kernel.org, Miroslav Benes <mbenes@...e.cz>
Subject: [PATCH] compiler-gcc.h: don't set COMPILER_HAS_GENERIC_BUILTIN_OVERFLOW for sparse
sparse errors out with
./include/linux/overflow.h:254:13: error: undefined identifier '__builtin_mul_overflow'
./include/linux/overflow.h:254:13: error: incorrect type in conditional
./include/linux/overflow.h:254:13: got void
./include/linux/overflow.h:256:13: error: undefined identifier '__builtin_add_overflow'
./include/linux/overflow.h:256:13: error: incorrect type in conditional
./include/linux/overflow.h:256:13: got void
Sparse has not acquired generic overflow builtins yet, so don't set
COMPILER_HAS_GENERIC_BUILTIN_OVERFLOW for it.
Signed-off-by: Miroslav Benes <mbenes@...e.cz>
Acked-by: Rasmus Villemoes <linux@...musvillemoes.dk>
---
include/linux/compiler-gcc.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/compiler-gcc.h b/include/linux/compiler-gcc.h
index f1a7492a5cc8..15e55b89e952 100644
--- a/include/linux/compiler-gcc.h
+++ b/include/linux/compiler-gcc.h
@@ -344,6 +344,6 @@
*/
#define uninitialized_var(x) x = x
-#if GCC_VERSION >= 50100
+#if GCC_VERSION >= 50100 && !defined(__CHECKER__)
#define COMPILER_HAS_GENERIC_BUILTIN_OVERFLOW 1
#endif
--
2.17.0
Powered by blists - more mailing lists