Commit 52ce0c02 authored by thoughtpolice's avatar thoughtpolice
Browse files

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: thoughtpolice's avatarAustin Seipp <aseipp@pobox.com>
parent fea6b089
......@@ -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]
......
......@@ -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]
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment