From 1d40928b2df6dd395c5c32a21f0ae41a56f74bea Mon Sep 17 00:00:00 2001 From: xleroy Date: Sun, 13 Oct 2013 10:02:52 +0000 Subject: PackedStructs.ml: cleanups and bug-fixes Ceval.ml: tolerate non-zero integers with pointer types. git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@2343 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e --- cparser/Ceval.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cparser/Ceval.ml') diff --git a/cparser/Ceval.ml b/cparser/Ceval.ml index 504f7e08..6fb0d37f 100644 --- a/cparser/Ceval.ml +++ b/cparser/Ceval.ml @@ -272,7 +272,7 @@ let constant_expr env ty e = try match unroll env ty, cast env ty e.etyp (expr env e) with | TInt(ik, _), I n -> Some(CInt(n, ik, "")) - | TPtr(_, _), I 0L -> Some(CInt(0L, IInt, "")) + | TPtr(_, _), I n -> Some(CInt(n, IInt, "")) | TPtr(_, _), S s -> Some(CStr s) | TPtr(_, _), WS s -> Some(CWStr s) | TEnum(_, _), I n -> Some(CInt(n, enum_ikind, "")) -- cgit