Fixes are available
April 2009 PTF for XL C/C++ Enterprise Edition for AIX, V9.0
July 2009 PTF for XL C/C++ Enterprise Edition for AIX, V9.0
November 2010 PTF for XL C/C++ Enterprise Edition for AIX, V9.0
March 2011 PTF for XL C/C++ Enterprise Edition for AIX, V9.0
July 2011 PTF for XL C/C++ Enterprise Edition for AIX, V9.0
December 2011 PTF for XL C/C++ Enterprise Edition for AIX, V9.0
March 2012 PTF for XL C/C++ Enterprise Edition for AIX, V9.0
January 2010 PTF for XL C/C++ Enterprise Edition for AIX, V9.0
May 2010 PTF for XL C/C++ Enterprise Edition for AIX, V9.0
August 2010 PTF for XL C/C++ Enterprise Edition for AIX, V9.0
APAR status
Closed as program error.
Error description
typedef function syntax causing Internal Compiler Error. This happens when the compiler tries to to compile the line "(this->*some_functions [*count++]) ();" TESTCASE: --------- class Test { public: void some_function(); void foo1(); void foo2(); void foo3(); }; void Test::foo1(){} void Test::foo2(){} void Test::foo3(){} typedef void (Test::*classfunc) (void); static classfunc some_functions [] = { &Test::foo1, &Test::foo2, &Test::foo3 }; void Test::some_function() { int *count; (this->*some_functions [*count++]) (); } int main() { class Test test_class; test_class.some_function(); }
Local fix
Replace "*count++" with a temp variable, i.e. void Test::some_function() { int *count; int temp=*count++; (this->*some_functions [temp]) (); }
Problem summary
Pointer-to-member function calls with side effects such as (p->*a[i++])() causes the compiler to fail by producing internal Compiler error.
Problem conclusion
The side-effects are now processed properly and the pointer-to-member function call implemented correctly. Install the PTF to get the fix.
Temporary fix
Comments
APAR Information
APAR number
IZ42531
Reported component name
XLC C++ AIX
Reported component ID
5724S7100
Reported release
900
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt
Submitted date
2009-01-26
Closed date
2009-03-19
Last modified date
2009-04-28
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
XLC C++ AIX
Fixed component ID
5724S7100
Applicable component levels
Document Information
Modified date:
28 April 2009