A fix is available
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
IV37037
Reported component name
XL C/C++ FOR AI
Reported component ID
5725C7200
Reported release
C10
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt
Submitted date
2013-02-20
Closed date
2013-03-12
Last modified date
2013-03-13
APAR is sysrouted FROM one or more of the following:
APAR is sysrouted TO one or more of the following:
LI77342
Fix information
Fixed component name
XL C/C++ FOR AI
Fixed component ID
5725C7200
Applicable component levels
RC10 PSY U858524
UP C
Rate this page:
Average rating
Copyright and trademark information
IBM, the IBM logo and ibm.com are trademarks of International Business Machines Corp., registered in many jurisdictions worldwide. Other product and service names might be trademarks of IBM or other companies. A current list of IBM trademarks is available on the Web at "Copyright and trademark information" at www.ibm.com/legal/copytrade.shtml.