Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!cornell!deb From: deb@svax.cs.cornell.edu (David Baraff) Newsgroups: comp.lang.c++ Subject: +e option in cfront 1.2 Summary: correct usage Keywords: virtual functions Message-ID: <21678@cornell.UUCP> Date: 12 Oct 88 15:47:55 GMT References: <246@oresoft.UUCP> Sender: nobody@cornell.UUCP Reply-To: deb@svax.cs.cornell.edu (David Baraff) Organization: Cornell Univ. CS Dept, Ithaca NY Lines: 28 Could someone please e-mail me the correct way to use the +e option in cfront 1.2? I had such a description of how/when/why to use this in regard to virtual functions, but I threw it out. (It came with the update notes for cfront 1.2 actually). On a related subject, suppose I have a header file containing class B : A { void foo() { printf("This is an inline function for B\n"); }; where 'foo' is virtual. Does this mean that every file containing this header will then contain a non-inline static copy of the function 'foo'? I.e. I assume that all virtual functions must be non-inline, so that the address of the function can be taken for the vtbl table. If the above is true, there should be some sort of warning that this is going to happen -- I must have libraries that have 27 static copies of functions, because each of the 27 .C files making up the library included the same header file. This must eat up space! Is there ever any point in writing virtual functions as inline? David Baraff deb@svax.cs.cornell.edu or allegra!deb