From mboxrd@z Thu Jan 1 00:00:00 1970 From: Fergus Henderson To: gcc@gcc.gnu.org Subject: Re: main() in toplev.c Date: Sun, 07 Jan 2001 18:30:00 -0000 Message-id: <20010108133026.A23280@hg.cs.mu.oz.au> References: <20010107192233.C25918@disaster.jaj.com> <20010108125500.A23186@hg.cs.mu.oz.au> <20010107211546.A26627@disaster.jaj.com> X-SW-Source: 2001-01/msg00340.html On 07-Jan-2001, Phil Edwards wrote: > On Mon, Jan 08, 2001 at 12:55:00PM +1100, Fergus Henderson wrote: > > > > Then I could build the gcc > > back-end as a library. > > Well, large parts are already scrunched together as an .a file for > convenience. I believe toplev.c is already included in that collection. Sure, I use libbackend.a already. The point is that I want a version of it that doesn't define main(). > Redefining main() shouldn't be too hard on a language-by-language basis. I could put #define main toplev_main in mercury/lang-options.h, I suppose. Or perhaps in a new file mercury/lang-main.h. But I think it would be cleaner to avoid `#define main', by doing it the way I described in my previous mail, with toplev.c defining toplev_main() and with main() defined in a different file. -- Fergus Henderson | "I have always known that the pursuit | of excellence is a lethal habit" WWW: < http://www.cs.mu.oz.au/~fjh > | -- the last words of T. S. Garp.