🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.g++
Article #398

Multiple inclusion of virtual tables...

#398
From: Michael Tiemann
Date: Sun, 26 Mar 1989 04:23
36 lines
2172 bytes
   Path: mit-eddie!ll-xn!ames!lll-winken!uunet!munnari!otc!metro!basser!usage!elecvax!spinifex!malcolmp
   From: malcolmp@spinifex.eecs.unsw.oz (Malcolm Purvis)
   Newsgroups: comp.lang.c++
   Date: 23 Mar 89 01:08:12 GMT
   References: <GRUNWALD.89Mar17220936@flute.cs.uiuc.edu>
   Organization: Kenso Kindi (UNSW)
   Lines: 33
   Apparently-To: lang-c++-netnews-distribution@prep.ai.mit.edu

   [My apologies if this topic has discussed in depth before.]

	   Couldn't you change the compiler to do the equivalent of +e<name>
   automatically so you wouldn't have these problems?  You could put in rules
   that say if when compiling a file it finds a constructor/destructor for a
   class, then the vtbl for that class is defined in this file, otherwise it is
   declared external.  This results in the vtbl being declared in one place
   just as with +e<name>, but you could then name your files however you like,
   and also you wouldn't have to change the Makefile.
Surprisingly enough, on a good day GNU C++ does this automatically.
However, it is very easily defeated by defining the constructors and
destructors in the class definition.

	   Of course the contructor/destructor rule is probably insufficient by
   itself, especially if the class has all inline member functions (inline
   virtual functions? How strange), but you should get the idea.
Why would you think that any other member functions should have any
effect?

	   Malcolm Purvis (malcolmp@{spectrum,spinifex}.eecs.unsw.oz)
		   University of NSW, Sydney, Australia.

   Honours: The students treat you like geniuses, the staff like postgrads, and
   the administration like children........

Michael
Technical Details
Message-ID: <8903260423.AA05952@yahi.stanford.edu>
Path: arc1-ca.pugleaf.net!utzoo!telly!attcan!uunet!tut.cis.ohio-state.edu!YAHI.STANFORD.EDU!mdt
References: <340@spinifex.eecs.unsw.oz>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!telly!attcan!uunet!tut.cis.ohio-state.edu!YAHI.STANFORD.EDU!mdt
From: mdt@YAHI.STANFORD.EDU (Michael Tiemann)
Newsgroups: gnu.g++
Subject: Multiple inclusion of virtual tables...
Message-ID: <8903260423.AA05952@yahi.stanford.edu>
Date: 26 Mar 89 04:23:01 GMT
References: <340@spinifex.eecs.unsw.oz>
Sender: daemon@tut.cis.ohio-state.edu
Reply-To: tiemann@lurch.stanford.edu
Distribution: gnu
Organization: GNUs Not Usenet
Lines: 36