Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.csd.uwm.edu!cs.utexas.edu!uunet!ncrlnk!ncr-sd!hp-sdd!hplabs!hp-ses!hpcuhb!hpcllla!hpclisp!hpclscu!shankar From: shankar@hpclscu.HP.COM (Shankar Unni) Newsgroups: comp.lang.c++ Subject: Re: Inline constructor problem Message-ID: <1000022@hpclscu.HP.COM> Date: 31 Aug 89 21:19:13 GMT References: <1990010@hpctdlk.HP.COM> Organization: Hewlett-Packard Calif. Language Lab Lines: 13 > 1. Constructors should not be inline. The reason is that even though > the body of the ctor looks trivial, the compiler may insert a > bunch of hidden stuff (such as base class constructor calls) that > can cause a surprising amount of bloat. Grouping all the ctors Point well taken. However, if cfront were a little smarter about things like null constructors and constructors for auto objects, this would not be such a problem. (For auto objects, cfront actually tosses out code inline to check to see if the object's address is NULL (!) and calls "new" otherwise. ---- Shankar.