------- Comment #3 from paul dot richard dot thomas at gmail dot com 2010-06-22 19:15 ------- Subject: Re: [OOP] Dynamic dispatch uses broken types Dear Tobias, > ------- Comment #2 from burnus at gcc dot gnu dot org  2010-06-22 15:00 ------- > CC Paul as he might have an idea how to handle it (cf. comment 1). It seems that our attempt to use the front end to describe polymorphism is running into difficulties and is facing us with what I had hoped to avoid: Coming to grips with the way that g++ does things. The reason that I had hoped to avoid this is obvious - none of us have the time to do it. Here is some partial documentation of what Richard is talking about: http://www.delorie.com/gnu/docs/gcc/gccint_40.html http://docs.freebsd.org/info/gxxint/gxxint.info.Macros.html http://www.math.utah.edu/docs/info/gxxint_1.html (some repetition). On the other hand, surely our front-endery can be persuaded to work? I guess that we have to ensure that the inherited vtables are all of the same type as the base type. Since all the vtables in a class consist of procedure pointers and pointers to generic vtables with exactly the same structure, this should be straightforward. I guess that the error is to add to the vtable all the extra methods of the inherited type, rather than sticking to overloading. > BTW: The mem-ref2 branch (cf. http://gcc.gnu.org/wiki/MemRef ) will be merged > soon. Oh bother, I feel another rush coming on, just when I was hoping that we could take stock of OOP and consider how to get it right :-( Paul -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44596