/[no]warn

Syntax:

/warn[:keyword...]), /nowarn, /4Yd, /4Nd, /4Ys, /W0, /W1, or /WX

The /warn option instructs the compiler to generate diagnostic messages for defined classes of additional checking that can be performed at compile-time. It also can change the severity level of issued compilation messages.

In the visual development environment, specify the Warning Level (/warn:nogeneral, default, or /warn:error) in the General or the Compiler Diagnostic Compiler Option Category. Specify individual Warning Options in the Compiler Diagnostic Compiler Option Category. The /warn options and their visual development environment names are:

/warn:noalignments
(Data Alignment)
/warn:argument_checking
(Argument Mismatch)
/warn:declarations or /4Yd
(Undeclared Variables)
/warn:errors or /WX
(Warning Level: Errors)
/warn:nofileopt
(Inform when Compiling Files Separately)
/warn:nogeneral
(Warning Level: Ignore)
/warn:ignore_loc
(Inform When Removing %LOC from an Argument)
/warn:stderror or /4Ys
(Treat Fortran Standard Warnings as Errors)
/warn:truncated_source
(Truncated Source)
/warn:nouncalled
(Uncalled Routines)
/warn:nouninitialized
(Uninitialized Variables)
/warn:unused
(Unused Variables)
/warn:nousage
(Usage)
/warn:all or /warn
/warn:none, /nowarn, or /W0

If you omit /warn, the defaults are:

The /warn keywords are:

For example, the following command requests the argument_checking and declarations keywords and accepts the defaults for the other /warn keywords:

 df /warn:(argument_checking,declarations) testfile.f90