Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#11218 closed feature request (fixed)

Provide `-W(no-)` aliases for `-f(no-)warn` warning flags

Reported by: hvr Owned by:
Priority: high Milestone: 8.0.1
Component: Compiler Version:
Keywords: Cc: quchen
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s): Phab:D1613
Wiki Page: Design/Warnings

Description (last modified by bgamari)

Move warning options out of the -f namespace and into -W where they belong. See Design/Warnings for details.

Change History (5)

comment:1 Changed 4 years ago by hvr

Differential Rev(s): Phab:D1613
Priority: normalhigh
Status: newpatch

comment:2 Changed 4 years ago by bgamari

Description: modified (diff)

comment:3 Changed 4 years ago by Herbert Valerio Riedel <hvr@…>

In 2206fa8c/ghc:

Add `-W(no-)xxx` aliases for `-f(no-)warn-xxx` flags

This also updates the user's guide to refer to the `-W`-based warning
flags by default.

Quoting the release note entry:

| Warnings can now be controlled with `-W(no-)...` flags in addition to
| the old `-f(no-)warn...` ones. This was done as the first part of a
| rewrite of the warning system to provide better control over warnings,
| better warning messages, and more common syntax compared to other
| compilers. The old `-fwarn...`-based warning flags will remain
| functional for the forseeable future.

This is part of
and addresses #11218

Reviewed By: hvr, bgamari

Differential Revision:

comment:4 Changed 4 years ago by hvr

Resolution: fixed
Status: patchclosed

comment:5 Changed 4 years ago by Herbert Valerio Riedel <hvr@…>

In 437ebdd/ghc:

Start using `-W` instead of `-f(no-)warn` in some places

This replaces some occurences of `-f(no-)warn` with the new `-W`-aliases
introduced via 2206fa8cdb120932 / #11218, in cases which are guaranteed
to be invoked with recent enough GHC (i.e. the stage1+ GHC).

After this commit, mostly the compiler and the testsuite remain using
`-f(wo-)warn...` because the compiler needs to be bootstrappable with
older GHCs, while for the testsuite it's convenient to be able to quickly
compare the behavior to older GHCs (which may not support the new flags yet).

The compiler-part can be updated to use the new flags once GHC 8.3 development

Reviewed By: quchen

Differential Revision:
Note: See TracTickets for help on using tickets.