Skip to content

Commit 3a0567d

Browse files
committed
Use asconst false for __auto_type
1 parent 9c9ca2f commit 3a0567d

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

src/frontc/cabs2cil.ml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5876,9 +5876,8 @@ and createAutoLocal ((((n, ndt, a, cloc) : A.name), (inite: A.init_expression))
58765876
else
58775877
match inite with
58785878
| SINGLE_INIT exp ->
5879-
(match doExp true exp (AExp None) with
5880-
| (_, exp, _) ->
5881-
let t = Cil.typeOf exp in
5879+
(match doExp false exp (AExp None) with (* doExp with AExp handles array and function types (AType would not!) *)
5880+
| (_, _, t) ->
58825881
let specs = t,NoStorage,false,[] in
58835882
createLocal specs name
58845883
)

0 commit comments

Comments
 (0)