[Bug c++/9447] [3.4 regression] using Base<T>::member does not work
reichelt at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Fri Aug 1 14:32:00 GMT 2003
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=9447
reichelt at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Resolution|FIXED |
------- Additional Comments From reichelt at gcc dot gnu dot org 2003-08-01 14:32 -------
The problem is still not fixed completely. Consider the following valid code:
-------------------------------------------------------------------
template <typename> struct A { int i; };
template <typename T> struct B : public A<T>
{
using A<T>::i;
int foo() const;
};
struct C {};
template <typename T> int B<T>::foo() const { return i; }
-------------------------------------------------------------------
Mainline still issues an error:
bug.cc: In member function `int B<T>::foo() const':
bug.cc:11: error: `i' undeclared (first use this function)
bug.cc:11: error: (Each undeclared identifier is reported only once for each
function it appears in.)
Even stranger: If I remove the totally unrelated definition of struct C
the code compiles!
Nathan, could you please have another look?
I really appreciate your efforts to make this work, since this bug
prevents me from using mainline for my project.
More information about the Gcc-bugs
mailing list