Fixes are available
April 2012 PTF for XL C/C++ for AIX, V11.1
July 2012 PTF for XL C/C++ for AIX, V11.1
October 2012 PTF for XL C/C++ for AIX, V11.1
February 2013 PTF for XL C/C++ for AIX, V11.1
XL C/C++ for AIX Fix Pack 14 (May 2013 PTF) for 11.1
XL C/C++ for AIX Fix Pack 15 (August 2013 PTF) for 11.1
XL C/C++ for AIX Fix Pack 16 (November 2013 PTF) for 11.1
XL C/C++ for AIX Fix Pack 17 (February 2014 PTF) for 11.1
XL C/C++ for AIX Fix Pack 18 (May 2014 PTF) for 11.1
XL C/C++ for AIX Fix Pack 19 (August 2014 PTF) for 11.1
XL C/C++ for AIX Fix Pack 20 (November 2014 PTF) for 11.1
XL C/C++ for AIX Fix Pack 21 (April 2015 PTF) for 11.1
XL C/C++ for AIX Fix Pack 22 (September 2015 PTF) for 11.1
XL C/C++ for AIX Fix Pack 23 (March 2016 PTF) for 11.1
XL C/C++ for AIX Fix Pack 24 (September 2016 PTF) for 11.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
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:
Fix information
Fixed component name
XL C/C++ AIX
Fixed component ID
5724X1300
Applicable component levels
RB10 PSY U851438
UP C
Document Information
Modified date:
29 March 2012