This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/9447] [3.4 regression] using Base<T>::member does not work
- From: "reichelt at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 1 Aug 2003 14:32:44 -0000
- Subject: [Bug c++/9447] [3.4 regression] using Base<T>::member does not work
- References: <20030127085600.9447.rguenth@tat.physik.uni-tuebingen.de>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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.