Commit 0a5de7df authored by Alberto Escolar Piedras's avatar Alberto Escolar Piedras Committed by Anas Nashif
Browse files

native_posix: override C standard version to 2011



Override the C standard used for compilation to C 2011
This is due to some tests using _Static_assert which is a 2011
feature, but otherwise relying on compilers supporting it also
when set to C99.
This was in general ok, but with some host compilers and C
library versions it led to problems. So we override it to 2011
for native_posix board.

Fixes: #8529

Signed-off-by: default avatarAlberto Escolar Piedras <alpi@oticon.com>
parent c2882410
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -14,3 +14,10 @@ zephyr_library_sources(
zephyr_ld_options(
  -lm
)

# Override the C standard used for compilation to C 2011
# This is due to some tests using _Static_assert which is a 2011 feature, but
# otherwise relying on compilers supporting it also when set to C99.
# This was in general ok, but with some host compilers and C library versions
# it led to problems. So we override it to 2011 for native_posix.
set_property(GLOBAL PROPERTY CSTD c11)