Date: Tue, 7 Jan 1997 08:51:55 +0200 (IST) From: Eli Zaretskii To: Arash cc: djgpp AT delorie DOT com Subject: Re: How can I reduce the compiled executable size? In-Reply-To: <32CF7FC6.F78@ios.chalmers.se> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Sun, 5 Jan 1997, Arash wrote: > > Now, it I compare the file sizes of with.exe and without.exe, > > 1-04-97 22:46 100,205 with.exe > > 1-04-97 22:47 61,446 without.exe > > Hmmm ....a wild guess is that DJGPP makes the function inline and then > unrulls the loop, (make five copies of gotoxy()) but does it make the > executable 40Kb larger??? GCC cannot inline a function which is taken from the library. It *must* see the function's source code when it inlines (if you think about it for a second, you will realize that it cannot be any other way, since inlining is done by the *compiler*, not the *linker*). > I assume that DJGPP's version of gotoxy() is a very complex function > (????) but it should NOT be inline if it's so big! No, it just is a part of a single large source file which holds all the conio functions together, and all of them are thus linked in. > BTW, the whole conio will not be linked to your exe-file. Yes, it will, since it is a single source module.