diff options
-rw-r--r-- | compiler/main/DynFlags.hs | 13 | ||||
-rw-r--r-- | docs/users_guide/flags.xml | 8 | ||||
-rw-r--r-- | docs/users_guide/using.xml | 10 |
3 files changed, 24 insertions, 7 deletions
diff --git a/compiler/main/DynFlags.hs b/compiler/main/DynFlags.hs index 13a5cba627..44bedce52d 100644 --- a/compiler/main/DynFlags.hs +++ b/compiler/main/DynFlags.hs @@ -1088,12 +1088,13 @@ dynamic_flags = [ , ( "monly-3-regs", NoArg (upd (\s -> s{stolen_x86_regs = 3}) )) , ( "monly-4-regs", NoArg (upd (\s -> s{stolen_x86_regs = 4}) )) - ------ Warning opts ------------------------------------------------- - , ( "W" , NoArg (mapM_ setDynFlag minusWOpts) ) - , ( "Werror" , NoArg (setDynFlag Opt_WarnIsError) ) - , ( "Wall" , NoArg (mapM_ setDynFlag minusWallOpts) ) - , ( "Wnot" , NoArg (mapM_ unSetDynFlag minusWallOpts) ) /* DEPREC */ - , ( "w" , NoArg (mapM_ unSetDynFlag minuswRemovesOpts) ) + ------ Warning opts ------------------------------------------------- + , ( "W" , NoArg (mapM_ setDynFlag minusWOpts) ) + , ( "Werror", NoArg (setDynFlag Opt_WarnIsError) ) + , ( "Wwarn" , NoArg (unSetDynFlag Opt_WarnIsError) ) + , ( "Wall" , NoArg (mapM_ setDynFlag minusWallOpts) ) + , ( "Wnot" , NoArg (mapM_ unSetDynFlag minusWallOpts) ) -- DEPRECATED + , ( "w" , NoArg (mapM_ unSetDynFlag minuswRemovesOpts) ) ------ Optimisation flags ------------------------------------------ , ( "O" , NoArg (upd (setOptLevel 1))) diff --git a/docs/users_guide/flags.xml b/docs/users_guide/flags.xml index d47fcbff4d..19e3c3d1be 100644 --- a/docs/users_guide/flags.xml +++ b/docs/users_guide/flags.xml @@ -968,7 +968,13 @@ <entry><option>-Werror</option></entry> <entry>make warnings fatal</entry> <entry>dynamic</entry> - <entry></entry> + <entry>-Wwarn</entry> + </row> + <row> + <entry><option>-Wwarn</option></entry> + <entry>make warnings non-fatal</entry> + <entry>dynamic</entry> + <entry>-Werror</entry> </row> <row> diff --git a/docs/users_guide/using.xml b/docs/users_guide/using.xml index f361548877..2fe5959b59 100644 --- a/docs/users_guide/using.xml +++ b/docs/users_guide/using.xml @@ -897,6 +897,16 @@ ghc -c Foo.hs</screen> </listitem> </varlistentry> + <varlistentry> + <term><option>-Wwarn</option>:</term> + <listitem> + <indexterm><primary><option>-Wwarn</option></primary></indexterm> + <para>Warnings are treated only as warnings, not as errors. This is + the default, but can be useful to negate a + <option>-Werror</option> flag.</para> + </listitem> + </varlistentry> + </variablelist> <para>The full set of warning options is described below. To turn |