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
An invalid error is generated related to a missing instantiated template with a local class. ----------------------------------------- "t.C", line 12.12: 1540-0253 (S) This use of undefined class "R<A>" is not valid ----------------------------------------- === TEST CASE === #include <new> template<class T> class R { }; template<class T> T* baz() { return NULL; } struct A { }; R<A> foo(); void bar(R<A>, A*); //template class R<A>; // uncommenting this fixes the error 1540-0253 int main(int ac, char **av) { struct F { ~F() { } } f; bar(foo(), new (baz<A>()) A()); }
Local fix
Provide forward declaration for template class.
Problem summary
USER AFFECTED: The problem appears when a function body has a local class with a user-defined destructor followed by an implicit instantiation. PROBLEM DESCRIPTION: In certain cases the implicit instantiation might be missed causing an error that the template instance is not defined.
Problem conclusion
The implicit instantiation is created when required.
Temporary fix
Comments
APAR Information
APAR number
LI75050
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 IZ48094
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