Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!agate!bionet!ames!oliveb!tymix!cirrusl!sun602!jayaram From: jayaram@sun602.uucp (Jayaram Kalpathy) Newsgroups: comp.lang.c++ Subject: Re: What does "munch" in C++ and/or Concurrent C do? Message-ID: <705@cirrusl.UUCP> Date: 30 Mar 89 18:36:17 GMT References: <220@rdahp.UUCP> <2312@cps3xx.UUCP> Sender: news@cirrusl.UUCP Reply-To: jayaram@sun602.UUCP (Jayaram Kalpathy) Distribution: usa Organization: CIRRUS LOGIC Inc. Lines: 15 If I remember correctly, munch is the part that goes through all the .o's that are being loaded, finds out what global classes are declared that need to have constructors called and then sticks in the code that invokes these constructors before `main'. It does slow down the compile terribly. At Data General, we had a version of the C++ compiler that built up a list of all these constructors into a function called, say, foo_file_x() for the file file_x.o so that all you had to do at link time was to make the stuff in _main call all these functions. One problem that AT&T C++ V1.2 had was that if you had global class variables defined in a file that had only variables and NO CODE, the constructors for these would not get called since the .o was never linked in !!!