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]

Re: c++ template bug


>>>>> "Alexandre" == Alexandre Oliva <oliva@dcc.unicamp.br> writes:

    Alexandre> Mark Mitchell <mark@markmitchell.com> writes:

    >>>>>>> "root" == root <root@ptpp09.phy.tu-dresden.de> writes:

    root> template<class T> class A { public: void f(); }; class B :
    root> public A<int> { public: void f(); }; int main() { B b; B& b1
    root> = b; b1.A<int>::f(); }

    >> I would have figured I had broken this with the changes I made
    >> last night, were it not for the fact that this appears to
    >> happen on the 1.1 branch as well as the mainline.

    Alexandre> What do you mean?  With the latest snapshot, on
    Alexandre> sparc-sun-solaris2.5, I only get:

    Alexandre> /tmp/ccFz204I.o: In function `main':
    Alexandre> /tmp/ccFz204I.o(.text+0x10): undefined reference to
    Alexandre> `A<int>::f(void)'

Well, with what's in CVS, I still seem to get:

  supernova.mitchells.org% ~/projects/egcs-1.1/objdir/gcc/cc1plus test.C
  test.C:3: warning: invalid use of type decl `class A<int>' as expression
  test.C:3: parse error before `>'

So, either one of us is crazy :-), or something's different between
the snapshot and the CVS tree, or ???

-- 
Mark Mitchell 			mark@markmitchell.com
Mark Mitchell Consulting	http://www.markmitchell.com


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