From: Ian Lynagh Date: Thu, 26 Feb 2009 00:16:06 +0000 (+0000) Subject: If we are given -Werror, then pass -Werror to cpp X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=commitdiff_plain;h=0b3b3ada70a54a3ea29ecfbbfabda33472e2c00c If we are given -Werror, then pass -Werror to cpp --- diff --git a/compiler/main/SysTools.lhs b/compiler/main/SysTools.lhs index 88d42ee..71a721e 100644 --- a/compiler/main/SysTools.lhs +++ b/compiler/main/SysTools.lhs @@ -350,8 +350,11 @@ runCpp :: DynFlags -> [Option] -> IO () runCpp dflags args = do let (p,args0) = pgm_P dflags args1 = args0 ++ args - mb_env <- getGccEnv args1 - runSomethingFiltered dflags id "C pre-processor" p args1 mb_env + args2 = if dopt Opt_WarnIsError dflags + then Option "-Werror" : args1 + else args1 + mb_env <- getGccEnv args2 + runSomethingFiltered dflags id "C pre-processor" p args2 mb_env runPp :: DynFlags -> [Option] -> IO () runPp dflags args = do