From 83506fb7cc2313303b46881d4d7fd854a9114e27 Mon Sep 17 00:00:00 2001 From: Markus Westerlind Date: Sat, 29 Apr 2017 23:49:43 +0200 Subject: [PATCH] Compile the regression tests using c99 to get the no-return-main test working Turns out that a missing return in the main function is only specified in c99. --- tests/test.hs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/test.hs b/tests/test.hs index 63789d1..a49c279 100644 --- a/tests/test.hs +++ b/tests/test.hs @@ -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 ])