IBM Support

LI76789: ERROR MSG WITH LIMITS HEADER AND XOPEN_SOURCE

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • Consider the following C++ source test.cpp:
    
    $ cat test.cpp
    #include <limits>
    int main(void) { return 0; }
    
    Compiled as is, it is fine:
    $ xlC -c test.cpp
    $
    
    With _XOPEN_SOURCE defined to 600, compilation fails:
    
    $xlC -c test.cpp -D_XOPEN_SOURCE=600
    "/usr/vacpp/include/limits", line 464.26: 1540-0274 (S) The
    name lookup for "LONGLONG_MIN" did not find a declaration.
    "/usr/vacpp/include/limits", line 466.26: 1540-0274 (S) The
    name lookup for "LONGLONG_MAX" did not find a declaration.
    "/usr/vacpp/include/limits", line 493.26: 1540-0274 (S) The
    name lookup for "ULONGLONG_MAX" did not find a declaration.
    
    Same is the case when defining _XOPEN_SOURCE to 500.
    

Local fix

  • The additional definition of _ALL_SOURCE fixes things:
    
    $ xlC -c test.cpp -D_XOPEN_SOURCE=600 -D_ALL_SOURCE
    $
    

Problem summary

  • USERS AFFECTED:
    Clients who have applications which include limits header and
    are compiled with _XOPEN_SOURCE definition can be affected by
    this issue.
    
    PROBLEM DESCRIPTION:
    Clients with applications that include limits header and with
    _XOPEN_SOURCE defined to 600 option, the compilation fails.
    The error message shows LONGLONG_MIN, LONGLONG_MAX and
    ULONGLONG_MAX are not defined.
    

Problem conclusion

  • We wanted to use [U]LLONG_* if C99 was on and [U]LONGLONG_* if
    ALL SOURCE was on.
    Compiler should not provide<long long> and <unsigned long long>
    specialisation when _XOPEN_SOURCE defined to 600 (or any other
    than _ALL_SOURCE).
    

Temporary fix

Comments

APAR Information

  • APAR number

    LI76789

  • Reported component name

    XL C/C++ FOR LI

  • Reported component ID

    5724X1400

  • Reported release

    B10

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2012-05-24

  • Closed date

    2012-05-24

  • Last modified date

    2012-05-24

  • APAR is sysrouted FROM one or more of the following:

    IV16544

  • APAR is sysrouted TO one or more of the following:

Fix information

  • Fixed component name

    XL C/C++ FOR LI

  • Fixed component ID

    5724X1400

Applicable component levels

[{"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SSXVZZ","label":"XL C\/C++ for Linux"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"B10","Line of Business":{"code":"LOB57","label":"Power"}}]

Document Information

Modified date:
17 October 2021