From 4d6c9149ce2ce2dfedd7db4ab9ad2b9e5750607e Mon Sep 17 00:00:00 2001 From: Bernhard Schommer Date: Thu, 1 Sep 2016 11:02:21 +0200 Subject: Simplified int to pointer tests. Now the same warning is triggered for both cases, int to ptr and ptr to int. Bug 18004 --- cparser/Cutil.ml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'cparser/Cutil.ml') diff --git a/cparser/Cutil.ml b/cparser/Cutil.ml index f7405098..19a32a7e 100644 --- a/cparser/Cutil.ml +++ b/cparser/Cutil.ml @@ -950,7 +950,8 @@ let valid_cast env tfrom tto = let int_pointer_conversion env tfrom tto = match unroll env tfrom, unroll env tto with - | (TInt _ | TEnum _),(TPtr _) -> true + | (TInt _ | TEnum _),(TPtr _) + | (TPtr _),(TInt _ | TEnum _) -> true | _,_ -> false (* Construct an integer constant *) -- cgit