Commit 0f8ecdcd authored by Ian Lynagh's avatar Ian Lynagh

Add a -Warn flag

parent 219bad9f
......@@ -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)))
......
......@@ -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>
......
......@@ -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
......
Markdown is supported
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