Fixes are available
May 2012 PTF for XL C/C++ for AIX, V10.1
January 2013 PTF for XL C/C++ for AIX, V10.1
XL C/C++ for AIX Fix Pack 18 (July 2013 PTF) for 10.1
XL C/C++ for AIX Fix Pack 19 (October 2013 PTF) for 10.1
XL C/C++ for AIX Fix Pack 21 (October 2015 PTF) for 10.1
September 2012 PTF for XL C/C++ for AIX, V10.1
XL C/C++ for AIX Fix Pack 20 (October 2014 PTF) for 10.1
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
IV19952
Reported component name
XL C++ AIX
Reported component ID
5724U8100
Reported release
A10
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt
Submitted date
2012-04-23
Closed date
2012-04-23
Last modified date
2012-04-23
APAR is sysrouted FROM one or more of the following:
APAR is sysrouted TO one or more of the following:
Fix information
Fixed component name
XL C++ AIX
Fixed component ID
5724U8100
Applicable component levels
[{"Business Unit":{"code":"BU054","label":"Systems w\/TPS"},"Product":{"code":"SSJT9L","label":"XL C\/C++"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"A.1","Edition":"","Line of Business":{"code":"LOB08","label":"Cognitive Systems"}}]
Document Information
Modified date:
23 April 2012