File tree Expand file tree Collapse file tree 7 files changed +9
-87
lines changed Expand file tree Collapse file tree 7 files changed +9
-87
lines changed Original file line number Diff line number Diff line change @@ -319,12 +319,6 @@ if(CONFIG_STD_C23)
319319 set (CSTD c2x)
320320elseif (CONFIG_STD_C17)
321321 set (CSTD c17)
322- elseif (CONFIG_STD_C11)
323- set (CSTD c11)
324- elseif (CONFIG_STD_C99)
325- set (CSTD c99)
326- elseif (CONFIG_STD_C90)
327- set (CSTD c90)
328322else ()
329323 message (FATAL_ERROR "Unreachable code. Expected C standard to have been chosen." )
330324endif ()
Original file line number Diff line number Diff line change @@ -355,20 +355,8 @@ endmenu
355355
356356menu "Compiler Options"
357357
358- config REQUIRES_STD_C99
359- bool
360- help
361- Hidden option to select compiler support C99 standard or higher.
362-
363- config REQUIRES_STD_C11
364- bool
365- select REQUIRES_STD_C99
366- help
367- Hidden option to select compiler support C11 standard or higher.
368-
369358config REQUIRES_STD_C17
370359 bool
371- select REQUIRES_STD_C11
372360 help
373361 Hidden option to select compiler support C17 standard or higher.
374362
@@ -381,31 +369,10 @@ config REQUIRES_STD_C23
381369choice STD_C
382370 prompt "C Standard"
383371 default STD_C23 if REQUIRES_STD_C23
384- default STD_C17 if REQUIRES_STD_C17
385- default STD_C11 if REQUIRES_STD_C11
386- default STD_C99
372+ default STD_C17
387373 help
388374 C Standards.
389375
390- config STD_C90
391- bool "C90"
392- depends on !REQUIRES_STD_C99
393- help
394- 1989 C standard as completed in 1989 and ratified by ISO/IEC
395- as ISO/IEC 9899:1990. This version is known as "ANSI C".
396-
397- config STD_C99
398- bool "C99"
399- depends on !REQUIRES_STD_C11
400- help
401- 1999 C standard.
402-
403- config STD_C11
404- bool "C11"
405- depends on !REQUIRES_STD_C17
406- help
407- 2011 C standard.
408-
409376config STD_C17
410377 bool "C17"
411378 depends on !REQUIRES_STD_C23
Original file line number Diff line number Diff line change @@ -152,12 +152,6 @@ config ARCH_POSIX
152152 select BARRIER_OPERATIONS_BUILTIN
153153 # POSIX arch based targets get their memory cleared on entry by the host OS
154154 select SKIP_BSS_CLEAR
155- # Override the C standard used for compilation to C 2011
156- # This is due to some tests using _Static_assert which is a 2011 feature, but
157- # otherwise relying on compilers supporting it also when set to C99.
158- # This was in general ok, but with some host compilers and C library versions
159- # it led to problems. So we override it to 2011 for the native targets.
160- select REQUIRES_STD_C11
161155 help
162156 POSIX (native) architecture
163157
Original file line number Diff line number Diff line change 1- set (c23id c2x gnu2x)
1+ set (c23id c2x gnu2x "iso9899:2023" "iso9899:2024" )
22set (c17id c17 c18 gnu17 gnu18 "iso9899:2017" "iso9899:2018" )
3- set (c11id c11 gnu11 "iso9899:2011" )
4- set (c99id c99 gnu99 "iso9899:1999" )
5- set (c90id c89 c90 gnu89 gnu90 "iso9899:1990" "iso9899:199409" )
63
74set (compile_features_list)
85
96# For each id value above a compile_features_${idval} with a list of supported
107# `c_std_XX` values are created for easy lookup.
118# For example, the settings
12- # - `compile_feature_c99 ` will contain `c_std_90;c_std_99 `
13- # - `compile_feature_iso9899:2011 ` will contain `c_std_90;c_std_99;c_std_11 `
9+ # - `compile_feature_c23 ` will contain `c_std_17;c_std_23 `
10+ # - `compile_feature_iso9899:2023 ` will contain `c_std_17;c_std_23 `
1411# that can then be used to set CMAKE_C_COMPILE_FEATURES accordingly.
15- foreach (standard 90 99 11 17 23)
12+ foreach (standard 17 23)
1613 list (APPEND compile_features_list c_std_${standard} )
1714 foreach (id ${c${standard} id})
1815 set (compile_features_${id} ${compile_features_list} )
Original file line number Diff line number Diff line change @@ -6,8 +6,6 @@ config ZEPHYR_NANOPB_MODULE
66
77menuconfig NANOPB
88 bool "Nanopb Support"
9- # Nanopb requires c_std_11 compiler features like _Static_assert
10- select REQUIRES_STD_C11
119 help
1210 This option enables the Nanopb library and generator.
1311
Original file line number Diff line number Diff line change @@ -19,24 +19,10 @@ tests:
1919 - qemu_riscv32
2020 - qemu_riscv32e
2121 - qemu_riscv64
22- bindesc.define.c99 :
23- extra_configs :
24- - CONFIG_STD_C99=y
25- bindesc.define.c11 :
26- extra_configs :
27- - CONFIG_STD_C11=y
28- bindesc.define.c17 :
22+ bindesc.define.c17 :
2923 extra_configs :
3024 - CONFIG_STD_C17=y
31- bindesc.define.gnu99 :
32- extra_configs :
33- - CONFIG_STD_C99=y
34- - CONFIG_GNU_C_EXTENSIONS=y
35- bindesc.define.gnu11 :
36- extra_configs :
37- - CONFIG_STD_C11=y
38- - CONFIG_GNU_C_EXTENSIONS=y
39- bindesc.define.gnu17 :
25+ bindesc.define.gnu17 :
4026 extra_configs :
4127 - CONFIG_STD_C17=y
4228 - CONFIG_GNU_C_EXTENSIONS=y
Original file line number Diff line number Diff line change 88 bindesc.read :
99 platform_allow :
1010 - native_sim
11- bindesc.read.c99 :
12- extra_configs :
13- - CONFIG_STD_C99=y
14- bindesc.read.c11 :
15- extra_configs :
16- - CONFIG_STD_C11=y
17- bindesc.read.c17 :
11+ bindesc.read.c17 :
1812 extra_configs :
1913 - CONFIG_STD_C17=y
20- bindesc.read.gnu99 :
21- extra_configs :
22- - CONFIG_STD_C99=y
23- - CONFIG_GNU_C_EXTENSIONS=y
24- bindesc.read.gnu11 :
25- extra_configs :
26- - CONFIG_STD_C11=y
27- - CONFIG_GNU_C_EXTENSIONS=y
28- bindesc.read.gnu17 :
14+ bindesc.read.gnu17 :
2915 extra_configs :
3016 - CONFIG_STD_C17=y
3117 - CONFIG_GNU_C_EXTENSIONS=y
You can’t perform that action at this time.
0 commit comments