Fixes are available
July 2009 PTF for XL C/C++ Enterprise Edition for AIX, V9.0
November 2010 PTF for XL C/C++ Enterprise Edition for AIX, V9.0
March 2011 PTF for XL C/C++ Enterprise Edition for AIX, V9.0
July 2011 PTF for XL C/C++ Enterprise Edition for AIX, V9.0
December 2011 PTF for XL C/C++ Enterprise Edition for AIX, V9.0
March 2012 PTF for XL C/C++ Enterprise Edition for AIX, V9.0
January 2010 PTF for XL C/C++ Enterprise Edition for AIX, V9.0
May 2010 PTF for XL C/C++ Enterprise Edition for AIX, V9.0
August 2010 PTF for XL C/C++ Enterprise Edition for AIX, V9.0
APAR status
Closed as program error.
Error description
The following redueced test case gives out invalid name lookup error message compiled on xlC: /* nt.cpp */ struct Base {}; struct Fifo{ void end(); }; // 38 struct FifoWithSync2:public Fifo{ typedef Fifo Base; Fifo* other() const; void end() { // 57 (S) other()->Base::end(); } }; $xlC nt.cpp "nt.cpp", line 16.18: 1540-0259 (S) The name lookups of "Base" do not yield the same type in the context of the expression and in the context of the class of the object expression. "nt.cpp", line 16.18: 1540-1209 (I) The name lookup in the context of "struct Fifo" resolved to "struct Base". "nt.cpp", line 16.18: 1540-1210 (I) Name lookup in the context of the expression resolved to "FifoWithSync2::Base".
Local fix
Change the tydef statement to another name, or remove it altogether. For example: typedef Fifo Base1; ... other()->Base1::end(); Or // typedef Fifo Base; ... other()->Fifo::end();
Problem summary
USER AFFECTED: The problem will only happen on a member access (. or ->) followed by a qualified name, when there is more than one name found by name lookup. PROBLEM DESCRIPTION: An incorrect name lookup caused the compiler to pick two names and report them in conflict.
Problem conclusion
The issue with name lookup has been fixed.
Temporary fix
Comments
APAR Information
APAR number
IZ51545
Reported component name
XLC C++ AIX
Reported component ID
5724S7100
Reported release
900
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt
Submitted date
2009-05-19
Closed date
2009-06-26
Last modified date
2009-07-21
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
XLC C++ AIX
Fixed component ID
5724S7100
Applicable component levels
Document Information
Modified date:
04 October 2021