Skip to content

Commit c4e4a32

Browse files
committed
Make gnu11 default cil.cstd
1 parent 42bddbd commit c4e4a32

2 files changed

Lines changed: 11 additions & 2 deletions

File tree

src/common/util/cilfacade.ml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,16 @@ let is_first_field x = match x.fcomp.cfields with
5555

5656
let init_options () =
5757
Mergecil.merge_inlines := get_bool "cil.merge.inlines";
58-
Cil.cstd := Cil.cstd_of_string (get_string "cil.cstd");
58+
Cil.cstd := (
59+
match get_string "cil.cstd" with
60+
| "c89" | "c90"
61+
| "gnu89" | "gnu90" -> C90
62+
| "c99" | "c9x"
63+
| "gnu99" | "gnu9x" -> C99
64+
| "c11" | "c1x"
65+
| "gnu11" | "gnu1x" -> C11
66+
| _ -> assert false
67+
);
5968
Cil.gnu89inline := get_bool "cil.gnu89inline";
6069
Cabs2cil.addNestedScopeAttr := get_bool "cil.addNestedScopeAttr";
6170

src/config/options.schema.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@
280280
"title": "cil.cstd",
281281
"type": "string",
282282
"description": "Specify the c standard used for preprocessing and parsing.",
283-
"default": "c99",
283+
"default": "gnu11",
284284
"enum": [
285285
"c89", "c90",
286286
"gnu89", "gnu90",

0 commit comments

Comments
 (0)