[commit: packages/Cabal] ghc-head: Make sure we test valid C99 programs. (52ce0c0)
git at git.haskell.org
git at git.haskell.org
Mon Aug 26 23:27:35 CEST 2013
Repository : ssh://git@git.haskell.org/Cabal
On branch : ghc-head
Link : http://git.haskell.org/?p=packages/Cabal.git;a=commit;h=52ce0c020c860ed57d89eb4fe89e3af8dac91a20
>---------------------------------------------------------------
commit 52ce0c020c860ed57d89eb4fe89e3af8dac91a20
Author: Austin Seipp <aseipp at pobox.com>
Date: Mon Jun 17 14:46:34 2013 -0500
Make sure we test valid C99 programs.
In particular, Clang is very fussy about not having this. It doesn't
really hurt anything, but it's better to suppress the annoying warning
properly.
Signed-off-by: Austin Seipp <aseipp at pobox.com>
>---------------------------------------------------------------
52ce0c020c860ed57d89eb4fe89e3af8dac91a20
Cabal/Distribution/Simple/GHC.hs | 2 +-
Cabal/Distribution/Simple/LHC.hs | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/Cabal/Distribution/Simple/GHC.hs b/Cabal/Distribution/Simple/GHC.hs
index 1ebbf49..6bf2316 100644
--- a/Cabal/Distribution/Simple/GHC.hs
+++ b/Cabal/Distribution/Simple/GHC.hs
@@ -364,7 +364,7 @@ configureToolchain ghcProg ghcInfo =
tempDir <- getTemporaryDirectory
ldx <- withTempFile False tempDir ".c" $ \testcfile testchnd ->
withTempFile False tempDir ".o" $ \testofile testohnd -> do
- hPutStrLn testchnd "int foo() {}"
+ hPutStrLn testchnd "int foo() { return 0; }"
hClose testchnd; hClose testohnd
rawSystemProgram verbosity ghcProg ["-c", testcfile,
"-o", testofile]
diff --git a/Cabal/Distribution/Simple/LHC.hs b/Cabal/Distribution/Simple/LHC.hs
index 136e8e2..ec71b41 100644
--- a/Cabal/Distribution/Simple/LHC.hs
+++ b/Cabal/Distribution/Simple/LHC.hs
@@ -206,7 +206,7 @@ configureToolchain lhcProg =
tempDir <- getTemporaryDirectory
ldx <- withTempFile False tempDir ".c" $ \testcfile testchnd ->
withTempFile False tempDir ".o" $ \testofile testohnd -> do
- hPutStrLn testchnd "int foo() {}"
+ hPutStrLn testchnd "int foo() { return 0; }"
hClose testchnd; hClose testohnd
rawSystemProgram verbosity lhcProg ["-c", testcfile,
"-o", testofile]
More information about the ghc-commits
mailing list