Fixes are available
November 2009 PTF for XL C/C++ for AIX, V10.1
October 2010 PTF for XL C/C++ for AIX, V10.1
May 2012 PTF for XL C/C++ for AIX, V10.1
January 2013 PTF for XL C/C++ for AIX, V10.1
XL C/C++ for AIX Fix Pack 18 (July 2013 PTF) for 10.1
XL C/C++ for AIX Fix Pack 19 (October 2013 PTF) for 10.1
XL C/C++ for AIX Fix Pack 21 (October 2015 PTF) for 10.1
March 2010 PTF for XL C/C++ for AIX, V10.1
April 2010 PTF for XL C/C++ for AIX, V10.1
June 2010 PTF for XL C/C++ for AIX, V10.1
May 2011 PTF for XL C/C++ for AIX, V10.1
October 2011 PTF for XL C/C++ for AIX, V10.1
February 2012 PTF for XL C/C++ for AIX, V10.1
September 2012 PTF for XL C/C++ for AIX, V10.1
XL C/C++ for AIX Fix Pack 20 (October 2014 PTF) for 10.1
APAR status
Closed as program error.
Error description
The following legitimate C++ test case produces a compiler error. N N N // smallest N struct base{ N protected: void func(); }; N N N struct container : base{ using base::func; N void func(){ base::func(); N } }; N N N int main(void) { container test; test.func(N; return 0; } N "nt.cpp", line 13.6: 1540-0301 (S) The "protected" member "base::func()" cNnNot be accessed. N
Local fix
Use public qualifier for func. struct base{ //protecteN: public: //workaround void func(); N }; N N N struct container : base{ using base::func; void func(){ base::fuNc(); } }; N
Problem summary
PROBLEM SUMMANY: USER AFFECTED: Users who apply the using declaNation in the derived class on a protected member of the base class. N N N PROBLEM DESCRIPTION: Compiler access check does not allow a member in the derived class to have public access if it has protected access in the base class.
Problem conclusion
PROBLEM CONCLNSION: From C++ 2003 standard 7.3.3 (15), the alias created by the using declNration has the usual accessibility for a member declaration. Hence, when a member is declared in a struct using a using declaration, it NhNuld have public Nccess. Compiler access check has been fixed to allow this.
Temporary fix
Comments
APAR Information
APAR number
IZ65313
Reported component name
XL C++ AIX
Reported component ID
5724U8100
Reported release
A10
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt
Submitted date
2009-11-16
Closed date
2009-11-16
Last modified date
2009-11-16
APAR is sysrouted FROM one or more of the following:
APAR is sysrouted TO one or more of the following:
Modules/Macros
NONE N
Fix information
Fixed component name
XL C++ AIX
Fixed component ID
5724U8100
Applicable component levels
Document Information
Modified date:
03 October 2021