I am using SDK v16.0.0 with s140 softdevice. In app_util.h, there is STATIC_ASSERT_SIMPLE and STATIC_ASSERT_MSG definition decided by platform like __CC_ARM or __GNUC__.
Things go wrong when I enable GNU extensions in Keil because I need zero length array feature, compiler version is 5, compile error like below:
..\..\..\..\..\..\components\libraries\util\app_util.h(225): warning: #47-D: incompatible redefinition of macro "STATIC_ASSERT_SIMPLE" (declared at line 219)
#define STATIC_ASSERT_SIMPLE(EXPR) extern char (*_do_assert(void)) [sizeof(char[1 - 2*!(EXPR)])]
..\..\..\..\..\..\components\libraries\util\app_util.h(226): warning: #47-D: incompatible redefinition of macro "STATIC_ASSERT_MSG" (declared at line 220)
#define STATIC_ASSERT_MSG(EXPR, MSG) extern char (*_do_assert(void)) [sizeof(char[1 - 2*!(EXPR)])]
How to fix this issue? I don't want to change nrf SDK directly. Thanks!
Regards,
Jinzhao Young