Skip to content
Snippets Groups Projects
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
No related branches found
No related tags found
No related merge requests found
...@@ -1208,6 +1208,7 @@ let get_temp_name ghost () = ...@@ -1208,6 +1208,7 @@ let get_temp_name ghost () =
(* Create a new temporary variable *) (* Create a new temporary variable *)
let newTempVar ~ghost loc descr (descrpure:bool) typ = let newTempVar ~ghost loc descr (descrpure:bool) typ =
let t' = (!typeForInsertedVar) typ in let t' = (!typeForInsertedVar) typ in
let t' = Cil.typeRemoveAttributes ["const"] t' in
let name = get_temp_name ghost () in let name = get_temp_name ghost () in
let vi = makeVarinfo ~ghost ~temp:true ~loc false false name t' in let vi = makeVarinfo ~ghost ~temp:true ~loc false false name t' in
vi.vdescr <- Some descr; vi.vdescr <- Some descr;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment