From bdd59ae7f2c51bc8a89ed973732b03d186c36960 Mon Sep 17 00:00:00 2001 From: Kaspar Schleiser Date: Thu, 10 Sep 2020 13:22:44 +0200 Subject: [PATCH] core: disable -Warray-bounds for XFA users --- core/include/xfa.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/core/include/xfa.h b/core/include/xfa.h index 20ce349a5c..640c56de54 100644 --- a/core/include/xfa.h +++ b/core/include/xfa.h @@ -24,6 +24,14 @@ #ifndef XFA_H #define XFA_H +/* + * Unfortunately, current gcc trips over accessing XFA's because of their + * zero-size start/end array that are used of symbol markers, with an "array + * index out of bounds" warning. So until a solution for that is found, we + * need to disable array bounds checks for files using XFAs. + */ +_Pragma("GCC diagnostic ignored \"-Warray-bounds\"") + /** * @brief helper macro for other XFA_* macros *