Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Alex D
GHC
Commits
0f8ecdcd
Commit
0f8ecdcd
authored
Sep 04, 2007
by
Ian Lynagh
Browse files
Add a -Warn flag
parent
219bad9f
Changes
3
Hide whitespace changes
Inline
Side-by-side
compiler/main/DynFlags.hs
View file @
0f8ecdcd
...
...
@@ -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
)))
...
...
docs/users_guide/flags.xml
View file @
0f8ecdcd
...
...
@@ -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>
...
...
docs/users_guide/using.xml
View file @
0f8ecdcd
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment