diff options
Diffstat (limited to 'cparser/Elab.ml')
-rw-r--r-- | cparser/Elab.ml | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/cparser/Elab.ml b/cparser/Elab.ml index 4decc105..a155c893 100644 --- a/cparser/Elab.ml +++ b/cparser/Elab.ml @@ -2101,6 +2101,10 @@ let elab_expr vararg loc env a = if not (compatible_types AttrIgnoreAll env ty1 ty2) then warning Compare_distinct_pointer_types "comparison of distinct pointer types (%a and %a)" (print_typ env) b1.etyp (print_typ env) b2.etyp; + let incomp_ty1 = wrap incomplete_type loc env ty1 + and incomp_ty2 = wrap incomplete_type loc env ty2 in + if incomp_ty1 <> incomp_ty2 then + warning Unnamed "comparison of complete and incomplete pointers"; EBinop(op, b1, b2, TPtr(ty1, [])) | TPtr _, (TInt _ | TEnum _) | (TInt _ | TEnum _), TPtr _ -> |