IBM Support

IV16544: 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

    IV16544

  • Reported component name

    XL C/C++ AIX

  • Reported component ID

    5724X1300

  • Reported release

    B10

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2012-03-01

  • Closed date

    2012-03-29

  • Last modified date

    2012-03-29

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

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

    PM60710 IV19952 LI76789

Fix information

  • Fixed component name

    XL C/C++ AIX

  • Fixed component ID

    5724X1300

Applicable component levels

  • RB10 PSY U851438

       UP C

[{"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SSGH3R","label":"XL C\/C++ for AIX"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"11.1","Edition":"","Line of Business":{"code":"LOB57","label":"Power"}}]

Document Information

Modified date:
29 March 2012