Specifies diagnostic messages to be issued by the compiler.
Windows: General > Compile Time Diagnostics (/warn:all, /warn:none)
Compilation Diagnostics > Treat Warnings as Errors (/warn:[no]errors)
Compilation Diagnostics > Treat Fortran Standard Warnings as Errors (/warn:[no]stderrors)
Compilation Diagnostics > Compile Time Diagnostics (/warn:all, /warn:none)
Compilation Diagnostics > Warn for Undeclared Symbols (/warn:[no]declarations)
Compilation Diagnostics > Warn for Unused Variables (/warn:[no]unused)
Compilation Diagnostics > Warn When Removing %LOC (/warn:[no]ignore_loc)
Compilation Diagnostics > Warn When Truncating Source Line (/warn:[no]truncated_source)
Compilation Diagnostics > Warn for Unaligned Data (/warn:[no]alignments)
Compilation Diagnostics > Warn for Uncalled Statement Function (/warn:[no]uncalled)
Compilation Diagnostics > Suppress Usage Messages (/warn:[no]usage)
Compilation Diagnostics > Check Routine Interfaces (/warn:[no]interfaces)
Linux: None
Mac OS X: General > Compile Time Diagnostics (-warn all, -warn none)
Compiler Diagnostics > Warn For Unaligned Data (-warn [no]alignments)
Compiler Diagnostics > Warn For Undeclared Symbols (-warn [no]declarations)
Compiler Diagnostics > Treat Warnings as Errors (-warn error)
Compiler Diagnostics > Warn When Removing %LOC (-warn [no]ignore_loc)
Compiler Diagnostics > Check Routine Interfaces (-warn [no]interfaces)
Compiler Diagnostics > Treat Fortran Standard Warnings As Errors (-warn [no]stderrors)
Compiler Diagnostics > Warn When Truncating Source Line (-warn [no]truncated_source)
Compiler Diagnostics > Warn For Uncalled Routine (-warn [no]uncalled)
Compiler Diagnostics > Warn For Unused Variables (-warn [no]unused)
Compiler Diagnostics > Suppress Usage Messages (-warn [no]usage)
IA-32, Intel® 64, IA-64 architectures
Linux and Mac OS X: | -warn [keyword] -nowarn |
Windows: | /warn[:keyword] /nowarn |
keyword |
Specifies the diagnostic messages to be issued. Possible values are:
|
alignments |
Warnings are issued about data that is not naturally aligned. |
general |
All information-level and warning-level messages are enabled. |
usage |
Warnings are issued for questionable programming practices. |
nodeclarations |
No errors are issued for undeclared symbols. |
noerrors |
Warning-level messages are not changed to error-level messages. |
noignore_loc |
No warnings are issued when %LOC is stripped from an argument. |
nointerfaces |
The compiler does not check interfaces of SUBROUTINEs called and FUNCTIONs invoked in your compilation against an external set of interface blocks. |
nostderrors |
Warning-level messages about Fortran standards violations are not changed to error-level messages. |
notruncated_source |
No warnings are issued when source exceeds the maximum column width in fixed-format files. |
nouncalled |
No warnings are issued when a statement function is not called. |
nounused |
No warnings are issued for variables that are declared but never used. |
This option specifies the diagnostic messages to be issued by the compiler.
Option |
Description |
---|---|
warn none |
Disables all warning messages. This is the same as specifying nowarn. |
warn noalignments |
Disables warnings about data that is not naturally aligned. |
warn declarations |
Enables error messages about any undeclared symbols. This option makes the default data type of a variable undefined (IMPLICIT NONE) rather than using the implicit Fortran rules. |
warn errors |
Tells the compiler to change all warning-level messages to error-level messages; this includes warnings about Fortran standards violations. |
warn nogeneral |
Disables all informational-level and warning-level diagnostic messages. |
warn ignore_loc |
Enables warnings when %LOC is stripped from an actual argument. |
warn interfaces |
Tells the compiler to check the interfaces of all SUBROUTINEs called and FUNCTIONs invoked in your compilation against a set of interface blocks stored separately from the source being compiled. The compiler generates a compile-time message if the interface used to invoke a routine does not match the interface defined in a .mod file external to the source (that is, in a .mod generated by option gen-interfaces as opposed to a .mod file USEd in the source). The compiler looks for these .mods in the current directory or in the directory specified by the include (-I) or -module option. warn interfaces turns on the option gen-interfaces by default. You can explicitly turn it off with /gen-interfaces- on Windows and -no-gen-interfaces on Linux and Mac OS X. |
warn stderrors |
Tells the compiler to change all warning-level messages about Fortran standards violations to error-level messages. This option sets the std03 option (Fortran 2003 standard). If you want Fortran 95 standards violations to become errors, you must specify options warn stderrors and std95. |
warn truncated_source |
Enables warnings when a source line exceeds the maximum column width in fixed-format source files. The maximum column width for fixed-format files is 72, 80, or 132, depending on the setting of the extend-source option. The warn truncated_source option has no effect on truncation; lines that exceed the maximum column width are always truncated. This option does not apply to free-format source files. |
warn uncalled |
Enables warnings when a statement function is never called. |
warn unused |
Enables warnings for variables that are declared but never used. |
warn nousage |
Disables warnings about questionable programming practices. Questionable programming practices, although allowed, often are the result of programming errors; for example: a continued character or Hollerith literal whose first part ends before the statement field and appears to end with trailing spaces. Note that the /pad-source option can prevent this error. |
warn all |
This is the same as specifying warn. This option does not set options warn errors or warn stderrors. To enable all the additional checking to be performed and force the severity of the diagnostic messages to be severe enough to not generate an object file, specify warn all warn errors or warn all warn stderrors. On Windows systems: In the Property Pages, Custom means that diagnostics will be specified on an individual basis. |
warn none |
Linux and Mac OS X: -nowarn, -w, -W0, -warn nogeneral Windows: /nowarn,/w, /W0, /warn:nogeneral |
warn declarations |
Linux and Mac OS X: -implicitnone, -u Windows: /4Yd |
warn nodeclarations |
Linux and Mac OS X: None Windows: /4Nd |
warn general |
Linux and Mac OS X: -W1 Windows: /W1 |
warn nogeneral |
Linux and Mac OS X: -W0, -w, -nowarn, -warn none Windows: /W0, /w, /nowarn, /warn:none |
warn stderrors |
Linux and Mac OS X: -e90, -e95, -e03 Windows: None |
warn nousage |
Linux and Mac OS X: -cm Windows: /cm |
warn all |
Linux and Mac OS X: -warn Windows: /warn |