Skip to content

Commit 3dfa002

Browse files
committed
Add missing void case to ternary operator typing
1 parent 7a7e1e4 commit 3dfa002

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/frontc/cabs2cil.ml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1911,6 +1911,7 @@ let conditionalConversion (t2: typ) (t3: typ) (e2: exp option) (e3:exp) : typ =
19111911
arithmeticConversion t2 t3
19121912
| TComp (comp2,_), TComp (comp3,_), _
19131913
when comp2.ckey = comp3.ckey -> t2
1914+
| TVoid [], TVoid [], _ -> TVoid [] (* TODO: what about qualifiers? standard says nothing *)
19141915
| TPtr(_, _), _, _ when isNullPtrConstant e3 -> t2
19151916
| _, TPtr(_, _), Some e2' when isNullPtrConstant e2' -> t3
19161917
| TPtr(b2, _), TPtr(TVoid _ as b3, _), _

0 commit comments

Comments
 (0)