Skip to content

Commit

Permalink
unop_FD: Handle BNot explicitely
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-schwarz committed Feb 4, 2024
1 parent 1eee742 commit 9f0c940
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/analyses/base.ml
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,8 @@ struct
let unop_FD = function
| Neg -> (fun v -> (Float (FD.neg v):value))
| LNot -> (fun c -> Int (FD.eq c (FD.of_const (FD.get_fkind c) 0.)))
(* other unary operators are not implemented on float values *)
| _ -> (fun c -> Float (FD.top_of (FD.get_fkind c)))
| BNot -> failwith "BNot on a value of type float!"


(* Evaluating Cil's unary operators. *)
let evalunop op typ: value -> value = function
Expand Down

0 comments on commit 9f0c940

Please sign in to comment.