Commit 084a6d88 authored by David Bühler's avatar David Bühler Committed by Andre Maroneze
Browse files

[kernel] Cabs2cil: do not create const temporary variables.

Removes the "const" attribute from types used to create temporary variables.
parent 292964f3
......@@ -1208,6 +1208,7 @@ let get_temp_name ghost () =
(* Create a new temporary variable *)
let newTempVar ~ghost loc descr (descrpure:bool) typ =
let t' = (!typeForInsertedVar) typ in
let t' = Cil.typeRemoveAttributes ["const"] t' in
let name = get_temp_name ghost () in
let vi = makeVarinfo ~ghost ~temp:true ~loc false false name t' in
vi.vdescr <- Some descr;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment