From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,a30a877db63b60c0 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!proxad.net!newsfeed.stueberl.de!newsfeed.r-kom.de!news-nue1.dfn.de!news-ham1.dfn.de!news.uni-hamburg.de!cs.tu-berlin.de!uni-duisburg.de!not-for-mail From: Georg Bauhaus Newsgroups: comp.lang.ada Subject: Re: Hello World 217Kb ? Date: Wed, 24 Nov 2004 02:27:15 +0000 (UTC) Organization: GMUGHDU Message-ID: References: NNTP-Posting-Host: l1-hrz.uni-duisburg.de X-Trace: a1-hrz.uni-duisburg.de 1101263235 9637 134.91.1.34 (24 Nov 2004 02:27:15 GMT) X-Complaints-To: usenet@news.uni-duisburg.de NNTP-Posting-Date: Wed, 24 Nov 2004 02:27:15 +0000 (UTC) User-Agent: tin/1.5.8-20010221 ("Blue Water") (UNIX) (HP-UX/B.11.00 (9000/800)) Xref: g2news1.google.com comp.lang.ada:6406 Date: 2004-11-24T02:27:15+00:00 List-Id: Jeffrey Carter wrote: : Georg Bauhaus wrote: : :> when I use the same compiler for translating a function that :> returns an uninitialised integer variable, I get :> the following sizes (-O, -static, -gnato): : : Let's be equivalent here. What do you get if you turn off run-time : checks, since C doesn't add them? I get surprisingly little less if anything at all, so I had omitted these binaries from the listing. I guess this is because GNAT always translates its own internal files with -gnatpg, so even -a won't change the size more than 2k for a 555k statically linked executable, 2k more actually. There is no change in size for the dynamically linked program (ret_code) when switching from -gnato to -gnatp. (The assembly listing is the same, there is no checking code, AFAICS.) Using some of the Restrictions pragmas the smallest I could get for this Ada program is 5224 bytes, after stripping symbols. The a.out file has 2856 bytes. Some sections of the disassembly are longer in Ada produce, one of them is adainit :-).