Added warning about unused binds to the compiler options
I have added my favourite compiler option "-fwarn-unused-binds" to the Makefile. I've then changed GenerateCPPCSP to have one explicit export, and the combination of the two would spot any future mistakes like not including the genAlt function in then GenOps structure (see previous patch). This new warning option already spots one problem with GenerateC, and I have a feeling it will also be useful in future.
This commit is contained in:
parent
5cfa79809b
commit
0a0110d122
|
@ -1,5 +1,5 @@
|
||||||
-- | Generate C code from the mangled AST.
|
-- | Generate C code from the mangled AST.
|
||||||
module GenerateCPPCSP where
|
module GenerateCPPCSP (generateCPPCSP) where
|
||||||
|
|
||||||
import Data.Char
|
import Data.Char
|
||||||
import Data.List
|
import Data.List
|
||||||
|
|
2
Makefile
2
Makefile
|
@ -28,7 +28,7 @@ sources = \
|
||||||
# profile_opts = -prof -auto-all
|
# profile_opts = -prof -auto-all
|
||||||
|
|
||||||
$(targets): $(sources)
|
$(targets): $(sources)
|
||||||
ghc -fglasgow-exts -fallow-undecidable-instances $(profile_opts) -o tock --make Main
|
ghc -fglasgow-exts -fallow-undecidable-instances -fwarn-unused-binds $(profile_opts) -o tock --make Main
|
||||||
|
|
||||||
CFLAGS = \
|
CFLAGS = \
|
||||||
-O2 \
|
-O2 \
|
||||||
|
|
Loading…
Reference in New Issue
Block a user