From e827f0bdf192f0318676c976c34c81fa314b8e58 Mon Sep 17 00:00:00 2001 From: Kaspar Schleiser Date: Tue, 1 Dec 2020 17:02:10 +0100 Subject: [PATCH] core/xfa: add comments explaining the pragmas --- core/include/xfa.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/core/include/xfa.h b/core/include/xfa.h index ecc6db8508..a1b068cd98 100644 --- a/core/include/xfa.h +++ b/core/include/xfa.h @@ -52,6 +52,11 @@ _Pragma("GCC diagnostic ignored \"-Warray-bounds\"") * This macro defines the symbols necessary to use XFA_START() and XFA_END(). * It needs to be part of one single compilation unit. * + * The pragmas prevent these errors: + * + * error: ISO C forbids empty initializer braces + * error: ISO C forbids zero-size array ‘xfatest_const_end’ + * * @param[in] type name of the cross-file array * @param[in] name name of the cross-file array */ @@ -69,6 +74,11 @@ _Pragma("GCC diagnostic ignored \"-Warray-bounds\"") * This macro defines the symbols necessary to use XFA_START() and XFA_END(). * It needs to be part of one single compilation unit. * + * The pragmas prevent these errors: + * + * error: ISO C forbids empty initializer braces + * error: ISO C forbids zero-size array ‘xfatest_end’ + * * @param[in] type name of the cross-file array * @param[in] name name of the cross-file array */