Fixes are available
May 2011 PTF for XL C/C++ for AIX, V11.1
August 2011 PTF for XL C/C++ for AIX, V11.1
November 2011 PTF for XL C/C++ for AIX, V11.1
January 2012 PTF for XL C/C++ for AIX, V11.1
April 2012 PTF for XL C/C++ for AIX, V11.1
July 2012 PTF for XL C/C++ for AIX, V11.1
October 2012 PTF for XL C/C++ for AIX, V11.1
February 2013 PTF for XL C/C++ for AIX, V11.1
XL C/C++ for AIX Fix Pack 14 (May 2013 PTF) for 11.1
XL C/C++ for AIX Fix Pack 15 (August 2013 PTF) for 11.1
XL C/C++ for AIX Fix Pack 16 (November 2013 PTF) for 11.1
XL C/C++ for AIX Fix Pack 17 (February 2014 PTF) for 11.1
XL C/C++ for AIX Fix Pack 18 (May 2014 PTF) for 11.1
XL C/C++ for AIX Fix Pack 19 (August 2014 PTF) for 11.1
XL C/C++ for AIX Fix Pack 20 (November 2014 PTF) for 11.1
XL C/C++ for AIX Fix Pack 21 (April 2015 PTF) for 11.1
XL C/C++ for AIX Fix Pack 22 (September 2015 PTF) for 11.1
XL C/C++ for AIX Fix Pack 23 (March 2016 PTF) for 11.1
XL C/C++ for AIX Fix Pack 24 (September 2016 PTF) for 11.1
APAR status
Closed as program error.
Error description
The xlC compiler generates 1540-0063(S) error for the below program conforming to C++ Standard. $ cat test.cpp class hoge { static const int n = 2; double (*a)[n]; int b; public: hoge():a(new double[n][n]),b(0) // caused 1540-0063(S) { } ~hoge() { delete [] a; } }; int main() { hoge a; return 0; } $xlC test.cpp "test.cpp", line 7.30: 1540-0063 (S) The text "b" is unexpected.
Local fix
Replace the order in ctor-initializer such as: <before> hoge():a(new double[n][n]),b(0) <after> hoge():b(0),a(new double[n][n])
Problem summary
PROBLEM DESCRIPTION: Name resolution in member initializer list was turned off in multidimensional array declarator, causing syntax error USERS AFFECTED: Users of comma separated member initializer list with the presence of multidimensional array declarator
Problem conclusion
Name resolution is turned on when encountering resolved name for member initializer.
Temporary fix
Comments
APAR Information
APAR number
IZ97039
Reported component name
XL C/C++ AIX
Reported component ID
5724X1300
Reported release
B10
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt
Submitted date
2011-03-21
Closed date
2011-04-20
Last modified date
2011-04-20
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++ AIX
Fixed component ID
5724X1300
Applicable component levels
RB10 PSY U843326
UP C
Document Information
Modified date:
20 April 2011