Skip to content
Snippets Groups Projects
Commit ac4373cc authored by Virgile Prevosto's avatar Virgile Prevosto Committed by David Bühler
Browse files

[printer] special treatment for __fc_sig_* following their new declaration

parent 4a09815e
No related branches found
No related tags found
No related merge requests found
...@@ -54,6 +54,10 @@ module Extensions = struct ...@@ -54,6 +54,10 @@ module Extensions = struct
end end
let set_extension_handler = Extensions.set_handler let set_extension_handler = Extensions.set_handler
(* for specific builtin functions that act as placeholder for C macros.
For each name f below, pretty-printer will replace f and &f with the
corresponding name. Be sure to keep the list in sync with share/libc.
*)
let rename_builtins = Datatype.String.Hashtbl.create 17 let rename_builtins = Datatype.String.Hashtbl.create 17
let () = let () =
...@@ -781,6 +785,9 @@ class cil_printer () = object (self) ...@@ -781,6 +785,9 @@ class cil_printer () = object (self)
Neither cookie nor keyword for you. *) Neither cookie nor keyword for you. *)
| AlignOf t -> fprintf fmt "__alignof__(%a)" (self#typ None) t | AlignOf t -> fprintf fmt "__alignof__(%a)" (self#typ None) t
| AlignOfE e -> fprintf fmt "__alignof__(%a)" self#exp_non_decay e | AlignOfE e -> fprintf fmt "__alignof__(%a)" self#exp_non_decay e
| AddrOf ((Var v, NoOffset))
when Datatype.String.Hashtbl.mem rename_builtins v.vname ->
self#varinfo fmt v
| AddrOf lv -> fprintf fmt "& %a" (self#lval_prec Precedence.addrOfLevel) lv | AddrOf lv -> fprintf fmt "& %a" (self#lval_prec Precedence.addrOfLevel) lv
| StartOf(lv) -> | StartOf(lv) ->
if state.print_cil_as_is || non_decay then if state.print_cil_as_is || non_decay then
......
...@@ -420,4 +420,4 @@ ...@@ -420,4 +420,4 @@
[inout] Out (internal) for function main: [inout] Out (internal) for function main:
Frama_C_entropy_source Frama_C_entropy_source
[inout] Inputs for function main: [inout] Inputs for function main:
Frama_C_entropy_source; SIG_DFL; SIG_IGN; SIG_ERR; undet Frama_C_entropy_source; undet
...@@ -348,4 +348,4 @@ ...@@ -348,4 +348,4 @@
[inout] Out (internal) for function main: [inout] Out (internal) for function main:
Frama_C_entropy_source Frama_C_entropy_source
[inout] Inputs for function main: [inout] Inputs for function main:
Frama_C_entropy_source; SIG_DFL; SIG_IGN; SIG_ERR; undet Frama_C_entropy_source; undet
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment