Special Handling of Math and String Library Functions

IBM C and C++ Compilers can improve optimization by generating substitute code for calls to some math and string functions available within the standard C and C++ runtime libraries. The functions handled this way are defined as macros in /usr/include/math.h or /usr/include/string.h.

The special handling of these functions occurs by default, when either math.h or string.h is included in the source program. To explicitly generate substitute code for a particular function, use the function with two underscores (__strcpy, for example).

When including math.h and string.h, avoid redeclaring the functions.

If your application requires a function call to one or all of the math or string functions, prevent special handling of all math or string functions within a source file by using either the -U __MATH__ or the -U __STR__ option on the command line. For example:

xlC -c -U__MATH__ file.c

Runtime performance of an application is affected if special handling is disabled.



Program Optimization with IBM C and C++ Compilers
Optimization Techniques Used by IBM C and C++ Compilers


-U Compiler Option