Fixed a discrepancy between the C and C++ backends over generating the code for replicators

This commit is contained in:
Neil Brown 2008-06-04 18:53:42 +00:00
parent 4c726352a4
commit cfbdfc555e
2 changed files with 4 additions and 2 deletions

View File

@ -24,6 +24,7 @@ module GenerateC
, cgenType
, cintroduceSpec
, cPreReq
, cremoveSpec
, genComma
, genCPasses
, generate

View File

@ -39,7 +39,7 @@ import System.IO
import qualified AST as A
import CompState
import GenerateC (cgenOps, cgenReplicatorLoop, cgenType, cintroduceSpec,
import GenerateC (cgenOps, cgenReplicatorLoop, cgenType, cintroduceSpec, cremoveSpec,
generate, genComma, genLeftB, genMeta, genName, genRightB, seqComma, withIf)
import GenerateCBased
import Metadata
@ -522,7 +522,8 @@ cppremoveSpec (A.Specification m n (A.Declaration _ t))
Nothing -> return ()
where
var = A.Variable m n
cppremoveSpec _ = return ()
-- Otherwise, defer to the C implementation:
cppremoveSpec sp = cremoveSpec sp
--Changed from GenerateC to add a name function (to allow us to use the same function for doing function parameters as constructor parameters)
--and also changed to use infixComma.