Fixes are available
APAR status
Closed as program error.
Error description
The compiler is emitting an invalid error message stating that the wrong number of arguments are provided for a function call that uses a default parameter. === TEST CASE === class ClassA { public: static bool func1( const int& a); template< typename T > static bool func2(const int& a); }; template< typename T > bool ClassA::func2(const int& a) { return T::inst().load( false ); // ONE PARAM GIVEN } template< class T > class ClassB { public: static T& inst() { return *(new T); } }; class ClassC { public: bool load( const bool& val1, const bool& val2 = false ); // DEFAULT PARAM }; bool ClassA::func1( const int& a ) { return func2< ClassB< ClassC > >( a ); } $ xlC -c apar.cpp "test.cpp", line 13.24: 1540-0215 (S) The wrong number of arguments has been specified for "ClassC::load(const bool &, const bool &)". "test.cpp", line 11.6: 1540-0700 (I) The previous message was produced while processing "ClassA::func2<ClassB<ClassC> >(const int &)". "test.cpp", line 32.12: 1540-0700 (I) The previous message was produced while processing "ClassA::func1(const int &)". $
Local fix
Problem summary
USERS AFFECTED: Users of template functions may be affected by this issue PROBLEM DESCRIPTION: Name lookup was incorrectly resolving names at the wrong location for a template-dependent call causing error messages.
Problem conclusion
The problem has been resolved in the compiler.
Temporary fix
Comments
APAR Information
APAR number
IV87850
Reported component name
XL C/C++ FOR AI
Reported component ID
5725C7200
Reported release
D10
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt / Xsystem
Submitted date
2016-08-15
Closed date
2016-08-15
Last modified date
2016-08-15
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 AI
Fixed component ID
5725C7200
Applicable component levels
[{"Business Unit":{"code":"BU048","label":"IBM Software"},"Product":{"code":"SSGH3R","label":"XL C\/C++ for AIX"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"13.1","Edition":"","Line of Business":{"code":"LOB73","label":"Power TPS"}}]
Document Information
Modified date:
19 August 2024