-y

In IBM® XL C/C++ for AIX® 16.1.0 or earlier releases, the -y option specifies the rounding mode for the compiler when the compiler evaluates constant floating-point expressions at compile time.

In IBM Open XL C/C++ for AIX 17.1.3, -y is not supported. There is no option to control the compile-time floating-point evaluation rounding mode. The Clang option -frounding-math gives you the ability to disable the optimizer from folding floating-point values that cannot be exactly represented; however, this might result in slower runtime performance.

The FE_TONEAREST macro, which is available in IBM Open XL C/C++ for AIX 17.1.3, matches the -y semantics. In IBM Open XL C/C++ for AIX 17.1.3, floating-point folding that is required by the language features such as initialization of global floating-point variables is done through FE_TONEAREST.

Related information