Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/cil.ml
Original file line number Diff line number Diff line change
Expand Up @@ -2028,7 +2028,12 @@ let kintegerCilint (k: ikind) (i: cilint) : exp =
if truncated = BitTruncation && !warnTruncate then
ignore (warnOpt "Truncating integer %s to %s"
(string_of_cilint i) (string_of_cilint i'));
Const (CInt64(int64_of_cilint i', k, None))
let str =
if string_of_cilint i <> string_of_cilint i' then
Some (string_of_cilint i)
else None
in
Const (CInt64(int64_of_cilint i', k, str))

(* Construct an integer constant with possible truncation *)
let kinteger64 (k: ikind) (i: int64) : exp =
Expand Down