IBM Support

Documentation errata for IBM XL C/C++ for Linux, V13.1

Preventive Service Planning


Abstract

This page contains corrections and additions to the product documentation shipped with IBM XL C/C++ for Linux, V13.1.

Content

The following corrections and additions apply to the Getting Started with IBM XL C/C++ for Linux, V13.1:

Topic location: What's new for IBM XL C/C++ for Linux, V13.1 > Built-in functions

POWER8 binary-coded decimal built-in functions

Should read:

Binary-coded decimal built-in functions

The following statement should be added:

The first three types of built-in functions are POWER8 built-in functions. BCD load and store functions are valid when -qarch is set to target POWER7 or POWER8 processors:

The following corrections and additions apply to the IBM XL C/C++ for Linux, V13.1 Installation Guide:

Topic location: Configuring IBM XL C/C++ for Linux 13.1 (for advanced users) > Running the xlc_configure utility directly (for advanced users) > xlc_configure options

-smprt xlsmprt_path

-xlcpprt xlrte_path

Should read:

-smprt xlsmprt_path

-xlcpprt xlrte_path

The following corrections and additions apply to the IBM XL C/C++ for Linux, V13.1 Compiler Reference:

Topic location: Configuring compiler defaults > Setting environment variables > Environment variables for parallel processing > Environment variables for OpenMP > OMP_STACKSIZE

The default value for 32-bit mode is 256M. For 64-bit mode, the default is up to the limit imposed by system resources.

Should read:

The default value is 4194304B. The maximum value for 32-bit mode is 256M. For 64-bit mode, the maximum is up to the limit imposed by system resources.

Topic location: Configuring compiler defaults > Using custom compiler configuration files > Using IBM XL C/C++ for Linux 13.1 with the Advance Toolchain

2. Run the new_install utility to create the vac.at.cfg configuration file. In the vac.at.cfg configuration file, all other entities except the XL C/C++ compiler are directed to those of the Advance Toolchain. The entities include the linker, headers, and runtime libraries.

Should read:

2. Run the new_install utility to create the xlc.at.cfg configuration file. In the xlc.at.cfg configuration file, all other entities except the XL C/C++ compiler are directed to those of the Advance Toolchain. The entities include the linker, headers, and runtime libraries.

new_insatll -at -prefix $ndi_path

Should read:

new_install -at -prefix $ndi_path

Topic location: Configuring compiler defaults >Configuring the gxlc or gxlc++ option mapping

The link to a complete list of GNU C and C++ and XL C/C++ option mappings should be:

http://www.ibm.com/support/docview.wss?uid=swg27039015

Topic location: Compiler options reference > Individual option descriptions > -O, -qoptimize

The following statement should be added under "Usage":

If optimization level -O3 or higher is specified on the command line, the -qhot and -qipa options that are set by the optimization level cannot be overridden by #pragma option_override(identifier, "opt(level, 0)") or #pragma option_override(identifier, "opt(level, 2)").



Topic location: Compiler options reference > Individual option descriptions > -qunroll

The following paragraph should be added to the end of the description for the n parameter:

If you specify a number for the -qunroll option, the compiler might limit unrolling to a number smaller than the value you specify. This is because the option form affects all loops in source files to which it applies and large unrolling factors might significantly increase compile time without necessarily improving runtime performance. To specify a specific unrolling factor for particular loops, use the #pragma form in those loops.



Topic location: Compiler pragmas reference > Individual pragma descriptions > #pragma option_override

Syntax

Should read:

Parameters

#pragma option_override value Equivalent compiler option
level, 0 -O
level, 2 -O2
level, 3 -O3
level, 4 -O4
level, 5 -O5
registerspillsize, size -qspill=size
size -qcompact
size, yes
size, no -qnocompact
strict, all -qstrict, -qstrict=all
strict, no, none -qnostrict
strict, suboption_list -qstrict=suboption_list

Should read:

#pragma option_override value Equivalent compiler option
level, 0 -O1
level, 2 -O21
level, 3 -O32
registerspillsize, size -qspill=size
size -qcompact
size, yes
size, no -qnocompact
strict -qstrict, -qstrict=all
strict, yes
strict, no -qnostrict
strict, suboption_list -qstrict=suboption_list

Notes:

  1. If optimization level -O3 or higher is specified on the command line, #pragma option_override(identifier, "opt(level, 0)") or #pragma option_override(identifier, "opt(level, 2)") does not turn off the implication of the -qhot and -qipa options.
  2. Specifying -O3 implies -qhot=level=0. However, specifying #pragma option_override(identifier, "opt(level, 3)") in source code does not imply -qhot=level=0.

Topic location: Compiler pragmas reference > Individual pragma descriptions > #pragma ibm independent_loop

This section should be moved out of the "Pragma directives for parallel processing" section and be put under the "Individual pragma descriptions" section directly.

The following statement should be added:

This pragma only takes effect if you specify the -qsmp or -qhot compiler option.



Topic location: Compiler built-in functions > Binary-coded decimal built-in functions

The following statement should be removed:

BCD built-in functions are valid only when -qarch is set to target POWER8 processors.



Topic location: Compiler built-in functions > Binary-coded decimal built-in functions > BCD add and subtract

The following statement should be added:

The following functions are valid only when -qarch is set to target POWER8 processors:



Topic location: Compiler built-in functions > Binary-coded decimal built-in functions > BCD test add and subtract for overflow

The following statement should be added:

The following functions are valid only when -qarch is set to target POWER8 processors:



Topic location: Compiler built-in functions > Binary-coded decimal built-in functions > BCD comparison

The following statement should be added:

The following functions are valid only when -qarch is set to target POWER8 processors:



Topic location: Compiler built-in functions > Binary-coded decimal built-in functions > BCD load and store

The following statement should be added:

The following functions are valid only when -qarch is set to target POWER7 or POWER8 processors:



Topic location: Compiler built-in functions > Binary-coded decimal built-in functions > BCD load and store > __vec_strmb

The following section should be removed:

Usage

Use this function with caution in multithreaded programs. This function might load and store up to two quadwords that contain the modified memory location.

The following statement should be added to the description of the cnt parameter:

The value of cnt must be in the range 1 - 16 and must be a compile-time known constant.



Topic location: Compiler built-in functions > Synchronization and atomic built-in functions > Synchronization functions > __lwsync, __iospace_lwsync

Load Word Synchronize

Should read:

Lightweight Synchronize



Topic location: Compiler built-in functions > Vector built-in functions > vec_ctf

The following note should be added under Purpose:

Note: The second and fourth elements of the result vector are undefined when the argument a is a signed long long or unsigned long long vector.



Topic location: Compiler built-in functions > Vector built-in functions

The following topics should be added under this section:

  • vec_xl
  • vec_xl_be
  • vec_xst
  • vec_xst_be

For details, see Adding support for vec_xl, vec_xl_be, vec_xst and vec_xst_be built-in functions.

The following corrections and additions apply to the IBM XL C/C++ for Linux, V13.1 Language Reference:

Topic location: Data opjects and declarations > Type attributes (IBM extension) > The may_alias type attribute (IBM extension)

The usage of the may_alias type attribute can result in less conservative aliasing relationships and provide more optimization opportunities comparing to usage of compiler option -qalias=ansi.

Should read:

The usage of the may_alias type attribute can result in less conservative aliasing relationships and provide more optimization opportunities comparing to usage of compiler option -qalias=noansi.



Topic location: Declarators > Pointers > Type-based aliasing

In the example:

Should read:

The compiler determines that the result of f += 1.0; is never used subsequently. Thus, the optimizer may discard the statement from the generated code.

Should read:

The compiler determines that the result of f += 1.0 does not affect the value of *p. Thus, the optimizer might move the assignment after the printf statement.



Topic location: Declarators > Initializers > Initialization of structures and unions

You do not have to initialize all members of a structure or union; the initial value of uninitialized structure members depends on the storage class associated with the structure or union variable. In a structure declared as static, any members that are not initialized are implicitly initialized to zero of the appropriate type; the members of a structure with automatic storage have no default initialization. The default initializer for a union with static storage is the default for the first component; a union with automatic storage has no default initialization.

The following definition shows a partially initialized structure:

    struct address {                   int street_no;                   char *street_name;                   char *city;                   char *prov;                   char *postal_code;                 };  struct address temp_address =                 { 44, "Knyvet Ave.", "Hamilton", "Ontario" };    

The values of temp_address are:

Member Value
temp_address.street_no 44
temp_address.street_name address of string "Knyvet Ave."
temp_address.city address of string "Hamilton"
temp_address.prov address of string "Ontario"
temp_address.postal_code Depends on the storage class of the temp_address variable; if it is static, the value would be NULL.

Should read:

You do not have to initialize all members of structure variables. If a structure variable does not have an initializer, the initial values of the structure members depend on the storage class associated with the structure variable:

  • If a structure variable has static storage, its members are implicitly initialized to zero of the appropriate type.
  • If a structure variable has automatic storage, its members have no default initialization.

If a structure variable is partially initialized, all the uninitialized structure members are implicitly initialized to zero no matter what the storage class of the structure variable is. See the following example:

    struct one {      int a;      int b;      int c;  };  void main(){      struct one z1;               // Members in z1 do not have default initial values.      static struct one z2;        // z2.a=0, z2.b=0, and z2.c=0.      struct one z3 = {1};         // z3.a=1, z3.b=0, and z3.c=0.  }  

In this example, structure variable z1 has automatic storage, and it does not have an initializer, so all the members in z1 do not have default initial values. Structure variable z2 has static storage, and all its members are implicitly initialized to zero. Structure variable z3 is partially initialized, so all its uninitialized members are implicitly initialized to zero.

You do not have to initialize all members of a union. The default initializer for a union with static storage is the default for the first component. A union with automatic storage has no default initialization.

The following corrections and additions apply to the IBM XL C/C++ for Linux, V13.1 Optimization and Programming Guide:

Topic location: Constructing a library > Compiling and linking a library > Linking a library to an application

where directory is the path to the directory containing the library libtest.a. By using the -l option, you instruct the linker to search in the directory specified via the -L option (and, for a shared library, the -R option) for libtest.so; if it is not found, the linker searches for libtest.a. For additional linkage options, including options that modify the default behavior, see the operating system ld documentation .

Should read:

At compile time, you instruct the linker to search for libtest.so in the first directory specified via the -L option. If libtest.so is not found, the linker searches for libtest.a. If neither file is found, the search continues with the next directory specified via the -L option.

At run time, the runtime linker searches for libtest.so in the first directory specified via the -R option. If libtest.so is not found, the search continues with the next directory specified via the -R option. The path specified by the -R option can be overridden at run time via the LD_LIBRARY_PATH environment variable.



Topic location: Optimizing your applications > Using profile-directed feedback

If the compiler cannot read any PDF files in this step, the compiler issues a severe error message and stops compilation.

Should read:

If the compiler cannot read any PDF files in this step, the compiler issues error message 1586-401 but continues the compilation. If you want the compiler to stop the compilation, specify option -qhaltonmsg=1586-401.

[{"Product":{"code":"SSXVZZ","label":"XL C\/C++ for Linux"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Component":"Documentation","Platform":[{"code":"PF016","label":"Linux"}],"Version":"13.1","Edition":"","Line of Business":{"code":"LOB57","label":"Power"}}]

Document Information

Modified date:
08 August 2018

UID

swg21672673