Skip to content

Commit 181b4e9

Browse files
committed
Use Internal castkind for computed goto encoding
1 parent 35ff8f3 commit 181b4e9

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/frontc/cabs2cil.ml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5005,7 +5005,7 @@ and doExp (asconst: bool) (* This expression is used as a constant *)
50055005
res
50065006
end
50075007
in
5008-
finishExp empty (makeCast ~kind:Unknown ~e:(integer addrval) ~newt:voidPtrType) voidPtrType
5008+
finishExp empty (makeCast ~kind:Internal ~e:(integer addrval) ~newt:voidPtrType) voidPtrType
50095009
end
50105010

50115011
| A.EXPR_PATTERN _ -> E.s (E.bug "EXPR_PATTERN in cabs2cil input")
@@ -6361,7 +6361,7 @@ and doDecl (isglobal: bool) (isstmt: bool) : A.definition -> chunk = function
63616361
let default =
63626362
defaultChunk
63636363
l el
6364-
(i2c (Set ((Mem (makeCast ~kind:Unknown ~e:(integer 0) ~newt:intPtrType),
6364+
(i2c (Set ((Mem (makeCast ~kind:Internal ~e:(integer 0) ~newt:intPtrType),
63656365
NoOffset),
63666366
integer 0, l, el)))
63676367
in
@@ -6981,7 +6981,7 @@ and doStatement (s : A.statement) : chunk =
69816981
match !gotoTargetData with
69826982
Some (switchv, switch) -> (* We have already generated this one *)
69836983
se
6984-
@@ i2c(Set (var switchv, makeCast ~kind:Unknown ~e:e' ~newt:!upointType, loc', locUnknown)) (* TODO: eloc for COMPGOTO *)
6984+
@@ i2c(Set (var switchv, makeCast ~kind:Internal ~e:e' ~newt:!upointType, loc', locUnknown)) (* TODO: eloc for COMPGOTO *)
69856985
@@ s2c(mkStmt(Goto (ref switch, loc')))
69866986

69876987
| None -> begin
@@ -7004,7 +7004,7 @@ and doStatement (s : A.statement) : chunk =
70047004
(* And make a label for it since we'll goto it *)
70057005
switch.labels <- [Label ("__docompgoto", loc', false)];
70067006
gotoTargetData := Some (switchv, switch);
7007-
se @@ i2c (Set(var switchv, makeCast ~kind:Unknown ~e:e' ~newt:!upointType, loc', locUnknown)) @@ (* TODO: eloc for COMPGOTO *)
7007+
se @@ i2c (Set(var switchv, makeCast ~kind:Internal ~e:e' ~newt:!upointType, loc', locUnknown)) @@ (* TODO: eloc for COMPGOTO *)
70087008
s2c switch
70097009
end
70107010
end

0 commit comments

Comments
 (0)