This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/9447] [3.4 regression] using Base<T>::member does not work


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]