Skip to content

Commit 8b39137

Browse files
committed
Rename cil.cstd option to std
This allows GCC-like --std=c11 as argument.
1 parent c4e4a32 commit 8b39137

3 files changed

Lines changed: 16 additions & 16 deletions

File tree

src/common/util/cilfacade.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ let is_first_field x = match x.fcomp.cfields with
5656
let init_options () =
5757
Mergecil.merge_inlines := get_bool "cil.merge.inlines";
5858
Cil.cstd := (
59-
match get_string "cil.cstd" with
59+
match get_string "std" with
6060
| "c89" | "c90"
6161
| "gnu89" | "gnu90" -> C90
6262
| "c99" | "c9x"

src/config/options.schema.json

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,20 @@
171171
"type": "string",
172172
"default": ".goblint"
173173
},
174+
"std": {
175+
"title": "std",
176+
"type": "string",
177+
"description": "Specify the c standard used for preprocessing and parsing.",
178+
"default": "gnu11",
179+
"enum": [
180+
"c89", "c90",
181+
"gnu89", "gnu90",
182+
"c99", "c9x",
183+
"gnu99", "gnu9x",
184+
"c11", "c1x",
185+
"gnu11", "gnu1x"
186+
]
187+
},
174188
"pre": {
175189
"title": "Preprocessing",
176190
"description": "Preprocessing options",
@@ -276,20 +290,6 @@
276290
},
277291
"additionalProperties": false
278292
},
279-
"cstd": {
280-
"title": "cil.cstd",
281-
"type": "string",
282-
"description": "Specify the c standard used for preprocessing and parsing.",
283-
"default": "gnu11",
284-
"enum": [
285-
"c89", "c90",
286-
"gnu89", "gnu90",
287-
"c99", "c9x",
288-
"gnu99", "gnu9x",
289-
"c11", "c1x",
290-
"gnu11", "gnu1x"
291-
]
292-
},
293293
"gnu89inline": {
294294
"title": "cil.gnu89inline",
295295
"type": "boolean",

src/maingoblint.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ let preprocess_files () =
267267
(* Preprocessor flags *)
268268
let cppflags = ref (get_string_list "pre.cppflags") in
269269

270-
cppflags := ("--std=" ^ get_string "cil.cstd") :: !cppflags;
270+
cppflags := ("--std=" ^ get_string "std") :: !cppflags;
271271

272272
if get_bool "ana.sv-comp.enabled" then (
273273
let architecture_flag = match get_string "exp.architecture" with

0 commit comments

Comments
 (0)