Fixes are available
April 2013 Update for XL C/C++ for Linux, V12.1
XL C/C++ for Linux Fix Pack 8 (October 2015 Update) for 12.1
XL C/C++ for Linux Fix Pack 4 (October 2013 Update) for 12.1
XL C/C++ for Linux Fix Pack 5 (December 2013 Update) for 12.1
XL C/C++ for Linux Fix Pack 6 (February 2014 Update) for 12.1
XL C/C++ for Linux Fix Pack 7 (May 2014 Update) for 12.1
APAR status
Closed as program error.
Error description
When compiling the following test case, the compiler incorrectly generates an error message: ====Compile command: xlC_r -q64 -c test.cpp ====Testcase: $ cat test.cpp class FOO { public: ~FOO() {} }; class StackObj { public: void operator delete(void* p) {} }; class MethodHandleWalker : StackObj { FOO foo; }; class MethodHandleCompiler : public MethodHandleWalker { }; int main(int argc, char* argv[]) { { MethodHandleCompiler mh; } return 1; } $ =====Actual Output: $ xlC_r -q64 -c test.cpp "test.cpp", line 11.28: 1540-0198 (W) The omitted keyword "private" is assumed for base class "StackObj". "test.cpp", line 6.7: 1540-0300 (S) The "private" member "class StackObj" cannot be accessed. "test.cpp", line 15.7: 1540-0719 (I) The previous message was produced while processing the implicit member function "MethodHandleCompiler::~MethodHandleCompiler()". "test.cpp", line 18.5: 1540-0700 (I) The previous message was produced while processing "main(int, char *[])". =====Expected Output: $ xlC_r -q64 -c test.cpp "test.cpp", line 11.28: 1540-0198 (W) The omitted keyword "private" is assumed for base class "StackObj". $
Local fix
N/A
Problem summary
USERS AFFECTED: This only happens for a compiler generated destructor of a derived class when its base class derives privately from the class where a publicly defined operator function resides. PROBLEM DESCRIPTION: Compiler is incorrectly generating access checking error (ie error code 1540-0300) for public operator delete function.
Problem conclusion
When access checking is performed for any operator functions we do not treat the enclosing class as the qualifier for the operator function to avoid diagnostic 1540-0300.
Temporary fix
Comments
APAR Information
APAR number
LI77342
Reported component name
XL C/C++ FOR LI
Reported component ID
5725C7300
Reported release
C10
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt
Submitted date
2013-04-27
Closed date
2013-04-27
Last modified date
2013-04-27
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 LI
Fixed component ID
5725C7300
Applicable component levels
RC10 PSN IV37037
UP06/09/13
[{"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SSXVZZ","label":"XL C\/C++ for Linux"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"12.1","Line of Business":{"code":"LOB57","label":"Power"}}]
Document Information
Modified date:
14 October 2021