IGNERRNO | NOIGNERRNO
Category
Optimization and tuning
Pragma equivalent
#pragma options (ignerrno) (C only), #pragma options (noignerrno) (C only)
Purpose
Allows the compiler to perform optimizations
that assume errno
is not modified by system calls.
When
the IGNERRNO compiler option is in effect, the compiler is informed
that your application is not using errno
. Specifying
this option allows the compiler to explore additional optimization
opportunities for library functions in LIBANSI. The input to the
library functions is assumed to be valid. Invalid input can lead to
undefined behavior.
When the NOIGNERRNO compiler option
is in effect, the compiler assumes that your application is using errno
.
Syntax
For NOOPT
and OPT(2)
:
For OPT(3)
:
Defaults
For NOOPT and OPT(2), the default option is NOIGNERRNO. For OPT(3), the default option is IGNERRNO.
Usage
ANSI library functions use errno
to
return the error condition. If your program does not use errno
,
the compiler has more freedom to explore optimization opportunities
for some of these functions (for example, sqrt()
).
You can control this optimization by using the IGNERRNO option.
The IGNERRNO option is turned on by OPTIMIZE(3). Use NOIGNERRNO to turn it off if necessary.
The usage status of this option is inserted in the object file to aid you in diagnosing a problem with your program.
IPA effects
The IPA compile step generates information for the IPA link step. The IGNERRNO option also affects the regular object module if you request one by specifying the IPA(OBJECT) option.
The IPA link step accepts the IGNERRNO option, but ignores it. The IPA link step merges and optimizes the application’s code, and then divides it into sections for code generation. Each of these sections is a partition. The IPA link step uses information from the IPA compile step to determine if a subprogram can be placed in a particular partition. Only compatible subprograms are included in a given partition. Compatible subprograms have the same IGNERRNO option setting. For the purpose of this compatibility checking, objects produced by compilers prior to OS/390® Version 2 Release 9, where IGNERRNO is not supported, are considered NOIGNERRNO.
The value of the IGNERRNO option for a partition is set to the value of the first subprogram that is placed in the partition. The Partition Map sections of the IPA link step listing and the object module display the value of the IGNERRNO option.
Predefined macros
__IGNERRNO__ macro is defined to 1 when the IGNERRNO option is in effect.