Fixes are available
October 2009 Update for XL C/C++ for Linux, V10.1
June 2011 Update for XL C/C++ for Linux, V10.1
XL C/C++ for Linux Fix Pack 8 (January 2014 Update) for 10.1
August 2010 Update for XL C/C++ for Linux, V10.1
January 2011 Update for XL C/C++ for Linux, V10.1
January 2012 Update for XL C/C++ for Linux, V10.1
July 2012 Update for XL C/C++ for Linux, V10.1
APAR status
Closed as program error.
Error description
The following valid C++ test case produced bogus error on V10.1 while compiling fine with the previous compiler versions. $cat t.cpp template <class A> struct Traits { }; template <class A> struct Allocator { }; template <class A, class B = Traits<A>, class C = Allocator<A> > struct Test { template <class D> static void test(const D&); }; template <class A, class B, class C> template <class D> void Test<A, B, C>::test(const D&) { Allocator<A> a; // works Traits<A> b; // works A aa; B bb; C c; // fails with xlC10, works with xlC8! } int main() { int i; Test<char>::test(i); return 0; } $xlC t.cpp "t.cpp", line 27.7: 1540-0140 (S) The text "c" is unexpected. "C" may be undeclared, ambiguous, or may require "typename" qualification. "t.cpp", line 21.6: 1540-0700 (I) The previous message was produced while processing "Test<char,Traits<char>,Allocator<char> >::test<int>(const int &)". "t.cpp", line 46.5: 1540-0700 (I) The previous message was produced while processing "main()".
Local fix
N/A
Problem summary
USER AFFECTED: This problem is very specific and will only appear when: 1) a template member function of a template class is defined out of line 2) there are at least 2 default template arguments 3) the default arguments are template dependent PROBLEM DESCRIPTION: Name lookup may fail to find the name of some parameters. This issue only affects V10.1.
Problem conclusion
The name lookup issue has been resolved.
Temporary fix
Comments
APAR Information
APAR number
LI75070
Reported component name
XL C/C++ RHEL52
Reported component ID
5724U8310
Reported release
A10
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt
Submitted date
2009-12-01
Closed date
2009-12-01
Last modified date
2009-12-01
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++ RHEL52
Fixed component ID
5724U8310
Applicable component levels
RA10 PSN IZ55647
UP06/09/13
[{"Business Unit":{"code":"BU054","label":"Systems w\/TPS"},"Product":{"code":"SSJT9L","label":"XL C\/C++"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"A.1","Line of Business":{"code":"LOB08","label":"Cognitive Systems"}}]
Document Information
Modified date:
14 October 2021