diff options
author | Bernhard Schommer <bernhardschommer@gmail.com> | 2016-09-01 11:02:21 +0200 |
---|---|---|
committer | Bernhard Schommer <bernhardschommer@gmail.com> | 2016-09-01 11:02:21 +0200 |
commit | 4d6c9149ce2ce2dfedd7db4ab9ad2b9e5750607e (patch) | |
tree | ff39bbdcfdb960376d7a5ccff3dc0dc159f5947e /cparser/Cutil.ml | |
parent | 204469913eaeffa2642268f35d018bc5329f9372 (diff) | |
download | compcert-kvx-4d6c9149ce2ce2dfedd7db4ab9ad2b9e5750607e.tar.gz compcert-kvx-4d6c9149ce2ce2dfedd7db4ab9ad2b9e5750607e.zip |
Simplified int to pointer tests.
Now the same warning is triggered for both cases, int to ptr and
ptr to int.
Bug 18004
Diffstat (limited to 'cparser/Cutil.ml')
-rw-r--r-- | cparser/Cutil.ml | 3 |
1 files changed, 2 insertions, 1 deletions
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 *) |