Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
E77790.pdf
Скачиваний:
2
Добавлен:
16.05.2024
Размер:
1.29 Mб
Скачать

3.4 Options Reference

Unlike -Bx, this option applies to the whole executable and need appear only once on the command line.

–dy|–dn are loader and linker options. If you compile and link in separate steps with these options, then you need the same option in the link step.

3.4.15–e

Accept extended length input source line.

Extended source lines can be up to 250 characters long. The compiler pads on the right with trailing blanks to column 250. If you use continuation lines while compiling with -e, then do not split character constants across lines, otherwise, unnecessary blanks may be inserted in the constants.

3.4.16–erroff[={%all|%none|taglist}]

Suppress warning messages listed by tag name.

Suppress the display of warning messages specified in the comma–separated list of tag names taglist. If %all, suppress all warnings, which is equivalent to the -w option. If %none, no warnings are suppressed. —erroff without an argument is equivalent to —erroff=%all.

Example:

f95 -erroff=WDECL_LOCAL_NOTUSED ink.f

Use the -errtags option to see the tag names associated with warning messages.

3.4.17–errtags[={yes|no}]

Display the message tag with each warning message.

With-errtags=yes, the compiler’s internal error tag name will appear along with warning messages. -errtags alone is equivalent to -errtags=yes.

The default is not to display the tag (-errtags=no).

62 Oracle Developer Studio 12.6: Fortran User's Guide • July 2017

3.4 Options Reference

demo% f95 -errtags ink.f ink.f:

MAIN:

"ink.f", line 11: Warning: local variable "i" never used (WDECL_LOCAL_NOTUSED)

3.4.18–errwarn[={%all|%none|taglist}]

Treat warning messages as errors.

The taglist specifies a list of comma-separated tag names of warning messages that should be treated as errors. If %all, treat all warnings as errors. If %none, no warnings are treated as errors.

See also -errtags.

3.4.19–ext_names=e

Create external names with or without trailing underscores.

e must be either plain, underscores, or fsecond-underscore The default is underscores.

–ext_names=plain: Do not add trailing underscore.

–ext_names=underscores: Add trailing underscore.

–ext_names=fsecond-underscore: Append two underscores to external names that contain an underscore, and a single underscore to those that do not.

An external name is a name of a subroutine, function, block data subprogram, or labeled common. This option affects both the name of the routine’s entry point and the name used in calls to it. Use this flag to allow Fortran routines to call (and be called by) other programming language routines.

fsecond-underscore is provided for compatibility with gfortran.

3.4.20–F

Invoke the source file preprocessor, but do not compile.

Chapter 3 • Fortran Compiler Options

63

3.4 Options Reference

Apply the fpp preprocessor to .F, .F90, .F95, and .F03 source files listed on the command line, and write the processed result on a file with the same name but with filename extension changed to .f (or .f95 or .f03), but do not compile.

Example:

f95 -F source.F

writes the processed source file to source.f

fpp is the default preprocessor for Fortran. The C preprocessor, cpp, can be selected instead by specifying -xpp=cpp.

3.4.21–f

Align doubleand quad-precision data in COMMON blocks.

-f is a legacy option flag equivalent to -aligncommon=16. Use of -aligncommon is preferred.

The default alignment of data in COMMON blocks is on 4-byte boundaries. -f changes the data layout of doubleand quad-precision data in COMMON blocks and EQUIVALENCE classes to be placed in memory along their “natural” alignment, which is on 8-byte boundaries (or on 16byte boundaries for quad-precision when compiling for 64-bit environments with -m64).

Note - -f may result in nonstandard alignment of data, which could cause problems with variables in EQUIVALENCE or COMMON and may render the program non-portable if -f is required.

Compiling any part of a program with -f requires compiling all subprograms of that program with -f.

By itself, this option does not enable the compiler to generate faster multi-word fetch/store

instructions on double and quad precision data. The

-dalign option does this and invokes -f

as well. Use of -dalign is preferred over the older

-f. See “3.4.10 –dalign” on page 60.

Because -dalign is part of the -fast option, so is

-f.

3.4.22–f77[=list]

Select FORTRAN 77 compatibility mode.

64 Oracle Developer Studio 12.6: Fortran User's Guide • July 2017

3.4 Options Reference

This option flag enables porting legacy FORTRAN 77 source programs, including those with language extensions accepted by the Sun WorkShop f77 compiler, to the f95 Fortran compiler. (There is no longer a separate FORTRAN 77 compiler.)

list is a comma-separated list selected from the following possible keywords:

keyword

meaning

 

 

%all

Enable all the Fortran 77 compatibility features.

 

 

%none

Disable all the Fortran 77 compatibility features.

 

 

backslash

Accept backslash as an escape sequence in character strings.

 

 

input

Allow input formats accepted by f77.

 

 

intrinsics

Limit recognition of intrinsics to only Fortran 77 intrinsics.

 

 

logical

Accept Fortran 77 usage of logical variables, such as:

 

■ assigning integer values to logical variables

 

■ allowing arithmetic expressions in logical conditional statements, with .NE.0 representing

 

.TRUE.

 

■ allowing relational operators .EQ. and .NE. with logical operands

 

 

misc

Allow miscellaneous f77 Fortran 77 extensions.

 

 

output

Generate f77-style formatted output, including list-directed and NAMELIST output.

 

 

subscript

Allow non-integer expressions as array subscripts.

 

 

tab

Enable f77-style TAB-formatting, including unlimited source line length. No blank padding

 

will be added to source lines shorter than 72 characters.

 

 

All keywords can be prefixed by no% to disable the feature, as in:

-f77=%all,no%backslash

The default, when -f77 is not specified, is -f77=%none. Using -f77 without a list is equivalent to specifying -f77=%all.

Exceptions Trapping and -f77:

Specifying -f77 does not change the Fortran trapping mode, which is -ftrap=common. f95 differs from the Fortran 77 compiler’s behavior regarding arithmetic exception trapping. The Fortran 77 compiler allowed execution to continue after an arithmetic exception occurred. Compiling with -f77 also causes the program to call ieee_retrospective on program exit to report on any arithmetic exceptions that might have occurred. Specify -ftrap=%none following the -f77 option flag on the command line to mimic the original Fortran 77 behavior.

See “4.12 Mixing Languages” on page 195 for complete information on f77 compatibility and Fortran 77 to Fortran 95 migration.

Chapter 3 • Fortran Compiler Options

65

Соседние файлы в предмете Информационные и сетевые технологии