Path: utzoo!attcan!uunet!wuarchive!zaphod.mps.ohio-state.edu!usc!apple!snorkelwacker!bloom-beacon!athena.mit.edu!bjaspan From: bjaspan@athena.mit.edu (Barr3y Jaspan) Newsgroups: comp.lang.c++ Subject: Re: this in Heap-/Stack Objects Message-ID: <1990Oct9.173642.5187@athena.mit.edu> Date: 9 Oct 90 17:36:42 GMT References: <1990Oct9.162831@jellosub.luftfahrt.uni-stuttgart.de> Sender: daemon@athena.mit.edu (Mr Background) Reply-To: bjaspan@athena.mit.edu (Barr3y Jaspan) Organization: Massachusetts Institute of Technology Lines: 19 |> "... code is secretly generated in a constructor to differ- |> entiate between objects created on the stack (the value of |> 'this' when the constructor is called is non-zero) and objects |> created on the free store (the value of 'this' when the con- |> structor is called is zero)..." Ack! Retch! Perhaps he is right about a particular compiler on a particular machine, but that does *not* sound like something you can depend on across machines and implementations. "Code is secretly generated" for a reason, namely, to hide an implementation detail. (BTW, I can tell you that the compilers I've worked with (g++ and cfront 2.0) have an implicit argument to member functions that conveys the information you mentioned. The compiler should not allow you to access it, however.) Barr3y Jaspan, bjaspan@athena.mit.edu