Fixes are available
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
The following reduced test case gives out function resolution error compiled with xlC. g++ compiles fine. <small.cxx> void func(bool arg){} void func(void* arg){} int main() { int nCorners[3] = {0, 0, 0}; func( (nCorners) ); return 0; } </small.cxx> $ xlC small.cxx "small.cxx", line 7.1: 1540-0219 (S) The call to "func" has no best match. "small.cxx", line 7.7: 1540-1228 (I) Argument number 1 is an lvalue of type "int [3]". "small.cxx", line 2.6: 1540-1202 (I) No candidate is better than "func(void *)". "small.cxx", line 7.7: 1540-1231 (I) The conversion from argument number 1 to "void *" uses "an array-to-pointer transformation" followed by "a pointer conversion". "small.cxx", line 1.6: 1540-1202 (I) No candidate is better than "func(bool)". "small.cxx", line 7.7: 1540-1231 (I) The conversion from argument number 1 to "bool" uses "an array-to-pointer transformation" followed by "a boolean conversion".
Local fix
Replace statement func( (nCorners) ); with func( void* (nCorners) );
Problem summary
USERS AFFECTED: Users with overloaded functions, especially with con- version from pointer to member to bool. PROBLEM DESCRIPTION: The compiler fails to choose the correct function especially when the program has two overloaded functions with the same rank.
Problem conclusion
The compiler is now able to handle functions with overload resolution having the same rank.
Temporary fix
Comments
APAR Information
APAR number
IZ51552
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-05-19
Closed date
2009-12-21
Last modified date
2009-12-21
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
[{"Line of Business":{"code":"LOB08","label":"Cognitive Systems"},"Business Unit":{"code":"BU054","label":"Systems w\/TPS"},"Product":{"code":"SSJT9L","label":"XL C\/C++"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"9.0"}]
Document Information
Modified date:
04 October 2021