A fix is available
APAR status
Closed as program error.
Error description
The compiler issues an error message in the utility header file; which the client doesn't include directly. ===== COMPILE COMMAND: xlC_r -q32 -qthreaded -qalias=ansi -qlanglvl=extended0x -c test.cpp ===== TESTCASE: $ cat test3.cpp #include <vector> #include <map> #include <algorithm> namespace { template <typename PairType> struct second_t { typename PairType::second_type operator()( const PairType& p ) const { return p.second; } }; template <typename MapType> second_t<typename MapType::value_type> second(const MapType &m) { static_cast<void>(m); return second_t<typename MapType::value_type>(); } } int main() { std::map<int, int> aMap; aMap.insert(1, 1); std::vector<int> seconds; std::transform(aMap.begin(), aMap.end(), std::back_inserter(seconds), second(aMap)); } $ ===== ACTUAL OUTPUT: $ xlC_r -q32 -qthreaded -qalias=ansi -qlanglvl=extended0x -c test.cpp "/usr/vacpp/include/utility", line 96.64: 1540-0063 (S) The text ")" is unexpected. $ ===== EXPECTED OUTPUT: $ xlC_r -q32 -qthreaded -qalias=ansi -qlanglvl=extended0x -c test.cpp /opt/IBM/xlC/13.1.0/include/xtree", line 360.32: 1540-0201 (S) The "unary *" operator is not allowed for type "int". /opt/IBM/xlC/13.1.0/include/xtree", line 358.22: 1540-0700 (I) The previous message was produced while processing "std::_Tree<std::_Tmap_traits<int,int,std::less<int>,std::alloca tor<std::pair<const int,int> >,0> >::insert<int>(int, int)". "test.cpp", line 26.9: 1540-0700 (I) The previous message was produced while processing "main()". $
Local fix
N/A
Problem summary
USERS AFFECTED: All users using -qlanglvl=extended0x with multiple less than operator beside identifiers are affected by this issue. PROBLEM DESCRIPTION: VariadicTemplate langlvl was causing some operator 'less than' to be registered as arglist inititation.
Problem conclusion
The compiler no longer confuses the 'less than' for arglist with -qlanglvl=variadictemplates.
Temporary fix
Comments
APAR Information
APAR number
LI78465
Reported component name
XL C/C++ FOR LI
Reported component ID
5725C7300
Reported release
D10
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt
Submitted date
2015-02-25
Closed date
2015-02-25
Last modified date
2015-02-25
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 LI
Fixed component ID
5725C7300
Applicable component levels
RD10 PSN IV64516
UP06/09/13
[{"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":"13.1","Line of Business":{"code":"LOB57","label":"Power"}}]
Document Information
Modified date:
17 October 2021