aboutsummaryrefslogtreecommitdiffstats
path: root/cfrontend
diff options
context:
space:
mode:
authorXavier Leroy <xavier.leroy@inria.fr>2018-03-13 14:04:49 +0100
committerXavier Leroy <xavier.leroy@inria.fr>2018-03-13 14:04:49 +0100
commit4d7a6709946a0c30e932c00405252b42e348eb64 (patch)
treeaca0e5450b17c0c5443800c30a9e0919fde856d1 /cfrontend
parent1c477f375f20e882b429175c737ad013ff202c0b (diff)
downloadcompcert-kvx-4d7a6709946a0c30e932c00405252b42e348eb64.tar.gz
compcert-kvx-4d7a6709946a0c30e932c00405252b42e348eb64.zip
Print size argument of Init_space as Z not as int32
Init_space has an argument of type Z and it can exceed the range of a 32-bit integer. Reported by Frédéric Besson.
Diffstat (limited to 'cfrontend')
-rw-r--r--cfrontend/PrintCsyntax.ml2
1 files changed, 1 insertions, 1 deletions
diff --git a/cfrontend/PrintCsyntax.ml b/cfrontend/PrintCsyntax.ml
index 6e016cb3..3a44796c 100644
--- a/cfrontend/PrintCsyntax.ml
+++ b/cfrontend/PrintCsyntax.ml
@@ -466,7 +466,7 @@ let print_init p = function
| Init_int64 n -> fprintf p "%LdLL" (camlint64_of_coqint n)
| Init_float32 n -> fprintf p "%.15F" (camlfloat_of_coqfloat n)
| Init_float64 n -> fprintf p "%.15F" (camlfloat_of_coqfloat n)
- | Init_space n -> fprintf p "/* skip %ld */@ " (camlint_of_coqint n)
+ | Init_space n -> fprintf p "/* skip %s */@ " (Z.to_string n)
| Init_addrof(symb, ofs) ->
let ofs = camlint_of_coqint ofs in
if ofs = 0l