Fixes are available
XL C/C++ for AIX Fix Pack 13 (August 2015 Update) for 12.1
XL C/C++ for AIX Fix Pack 14 (December 2015 Update) for 12.1
XL C/C++ for AIX Fix Pack 15 (April 2016 Update) for 12.1
XL C/C++ for AIX Fix Pack 16 (July 2016 Update) for 12.1
XL C/C++ for AIX Fix Pack 17 (November 2016 Update) for 12.1
XL C/C++ for AIX Fix Pack 18 (February 2017 Update) for 12.1
XL C/C++ for AIX Fix Pack 19 (August 2017 Update) for 12.1
XL C/C++ for AIX Fix Pack 20 (March 2018 Update) for 12.1
XL C/C++ for AIX Fix Pack 21 (January 2019 Update) for 12.1
APAR status
Closed as program error.
Error description
A simple template specialization is used to strip the const qualification from a given type. When a const-qualified multi-dimensional array is used, the const qualification is not removed. === TEST CASE === #include <iostream> template <typename T> struct remove_const { typedef T type; }; template <typename T> struct remove_const <T const> { typedef T type; }; template <typename T> struct test { void operator()() { std::cout << "not const qualified\n"; } }; template <typename T> struct test<T const> { void operator()() { std::cout << "const qualified\n"; } }; int main() { std::cout << "const int[4][2]: "; test<remove_const<const int[4][2]>::type>()(); } $ xlC apar.cpp $ ./a.out const int[4][2]: const qualified $
Local fix
Problem summary
PROBLEM DESCRIPTION: The compiler component that removes const did not consider all array dimensions. USERS AFFECTED: Users with problems removing const on template parameters with multi-dimensional arrays.
Problem conclusion
The problem has been fixed.
Temporary fix
Comments
APAR Information
APAR number
IV73047
Reported component name
XL C/C++ FOR AI
Reported component ID
5725C7200
Reported release
C10
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt / Xsystem
Submitted date
2015-05-07
Closed date
2015-08-20
Last modified date
2015-08-20
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++ FOR AI
Fixed component ID
5725C7200
Applicable component levels
RC10 PSY
UP
Document Information
Modified date:
14 September 2021