Skip to content

Commit

Permalink
Compile the regression tests using c99 to get the no-return-main test…
Browse files Browse the repository at this point in the history
… working

Turns out that a missing return in the main function is only specified in c99.
  • Loading branch information
Marwes committed Apr 29, 2017
1 parent c79ffbe commit 83506fb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/test.hs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,10 @@ runRegressionTest :: String -> [String] -> IO (ExitCode, ExitCode, String)
runRegressionTest name args = do
let cName = regressionDir </> (name ++ ".c")

(_, gccStdout, gccStderr) <- readProcessWithExitCode "gcc" ["-o", "dist/build" </> name, cName] ""
(_, gccStdout, gccStderr) <- readProcessWithExitCode
"gcc"
["-o", "dist/build" </> name, "--std=c99", cName]
""
(expected, cStdout, cStdErr) <- readProcessWithExitCode ("dist/build" </> name) args ""

result <- runExceptT (mainWithArgs [ cName ])
Expand Down

0 comments on commit 83506fb

Please sign in to comment.