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)
319
319
set (CSTD c2x)
320
320
elseif (CONFIG_STD_C17)
321
321
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)
328
322
else ()
329
323
message (FATAL_ERROR "Unreachable code. Expected C standard to have been chosen." )
330
324
endif ()
Original file line number Diff line number Diff line change @@ -355,20 +355,8 @@ endmenu
355
355
356
356
menu "Compiler Options"
357
357
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
-
369
358
config REQUIRES_STD_C17
370
359
bool
371
- select REQUIRES_STD_C11
372
360
help
373
361
Hidden option to select compiler support C17 standard or higher.
374
362
@@ -381,31 +369,10 @@ config REQUIRES_STD_C23
381
369
choice STD_C
382
370
prompt "C Standard"
383
371
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
387
373
help
388
374
C Standards.
389
375
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
-
409
376
config STD_C17
410
377
bool "C17"
411
378
depends on !REQUIRES_STD_C23
Original file line number Diff line number Diff line change @@ -152,12 +152,6 @@ config ARCH_POSIX
152
152
select BARRIER_OPERATIONS_BUILTIN
153
153
# POSIX arch based targets get their memory cleared on entry by the host OS
154
154
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
161
155
help
162
156
POSIX (native) architecture
163
157
Original file line number Diff line number Diff line change 1
- set (c23id c2x gnu2x)
1
+ set (c23id c2x gnu2x "iso9899:2023" "iso9899:2024" )
2
2
set (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" )
6
3
7
4
set (compile_features_list)
8
5
9
6
# For each id value above a compile_features_${idval} with a list of supported
10
7
# `c_std_XX` values are created for easy lookup.
11
8
# 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 `
14
11
# 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)
16
13
list (APPEND compile_features_list c_std_${standard} )
17
14
foreach (id ${c${standard} id})
18
15
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
6
6
7
7
menuconfig NANOPB
8
8
bool "Nanopb Support"
9
- # Nanopb requires c_std_11 compiler features like _Static_assert
10
- select REQUIRES_STD_C11
11
9
help
12
10
This option enables the Nanopb library and generator.
13
11
Original file line number Diff line number Diff line change @@ -19,24 +19,10 @@ tests:
19
19
- qemu_riscv32
20
20
- qemu_riscv32e
21
21
- 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 :
29
23
extra_configs :
30
24
- 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 :
40
26
extra_configs :
41
27
- CONFIG_STD_C17=y
42
28
- CONFIG_GNU_C_EXTENSIONS=y
Original file line number Diff line number Diff line change 8
8
bindesc.read :
9
9
platform_allow :
10
10
- 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 :
18
12
extra_configs :
19
13
- 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 :
29
15
extra_configs :
30
16
- CONFIG_STD_C17=y
31
17
- CONFIG_GNU_C_EXTENSIONS=y
You can’t perform that action at this time.
0 commit comments