From 7a7eefa33ecbca23c471ddfdd77d2a5e1d28c8e8 Mon Sep 17 00:00:00 2001 From: Neil Brown Date: Sun, 12 Apr 2009 13:02:58 +0000 Subject: [PATCH] Changed inline items to always be static I'm not sure if this is a valid thing to do, but it solved a problem with the occam libraries where multiple occam files were including an inline FUNCTION from an include file, and this was causing problems at link time. --- backends/GenerateC.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/backends/GenerateC.hs b/backends/GenerateC.hs index 33be361..6ab60ff 100644 --- a/backends/GenerateC.hs +++ b/backends/GenerateC.hs @@ -1555,7 +1555,9 @@ genProcSpec lvl n (A.Proc _ (sm, rm) fs (Just p)) forwardDecl || rm == A.Recursive then (genParHeader, genParParams) else (genNormalHeader, return ()) - genStatic lvl n + if sm == A.InlineSpec + then tell ["static "] -- definitely static + else genStatic lvl n header if forwardDecl then tell [";\n"]