Commit dd2f425b authored by Mikhail Glushenkov's avatar Mikhail Glushenkov
Browse files

Merge pull request #1376 from thoughtpolice/clang-tweak

Make sure we test valid C99 programs.
parents fea6b089 52ce0c02
......@@ -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