diff --git a/copilot-c99/src/Copilot/Compile/C99/CodeGen.hs b/copilot-c99/src/Copilot/Compile/C99/CodeGen.hs index 9b9ea8db..7b49cf59 100644 --- a/copilot-c99/src/Copilot/Compile/C99/CodeGen.hs +++ b/copilot-c99/src/Copilot/Compile/C99/CodeGen.hs @@ -31,7 +31,7 @@ genfun name expr ty = C.FunDef cty name [] cvars [C.Return $ Just cexpr] where mkextdecln :: External -> C.Decln mkextdecln (External name _ ty) = decln where decln = C.VarDecln (Just C.Extern) cty name Nothing - cty = transtype ty + cty = C.Volatile (transtype ty) -- | Make a declaration for a copy of an external variable. mkextcpydecln :: External -> C.Decln