Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!devo.att.com!fox From: fox@devo.att.com Newsgroups: gnu.g++.bug Subject: Reference casting bug in g++-1.36.2-jan7 Message-ID: <9001111604.AA01470@life.ai.mit.edu> Date: 11 Jan 90 16:03:37 GMT Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 19 There seems to be a problem with casting references into derived types. The following program elicits the error message: bug.C:5: request for member `i' in something not a class, structure or union This worked in g++-1.36.2-dec21. Let me know if this bug is reproducable, so I can tell if there is some problem with the way I compiled the compiler. ---------------- cut here ---------------- class Base {}; class Derived : public Base { int i; void f(Base& a) {return ((Derived&)a).i;} }; ------------------------------------------ David Fox fox@allegra.att.com