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=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,147f221051e5a63d X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews.google.com!k37g2000hsf.googlegroups.com!not-for-mail From: Maciej Sobczak Newsgroups: comp.lang.ada Subject: Re: memory management in Ada: tedious without GC? Date: Sun, 25 May 2008 04:28:47 -0700 (PDT) Organization: http://groups.google.com Message-ID: <8c1a6493-bba0-45b2-a881-78cff26eef5a@k37g2000hsf.googlegroups.com> References: <4ddef8bf-b5b1-4d7e-b75b-386cd6c8402c@l17g2000pri.googlegroups.com> <9f2c2db4-d6c1-4cdf-884c-5cbc26ac7701@d1g2000hsg.googlegroups.com> <1qxcw3pphdlek.1jgsfwb7atdmo.dlg@40tude.net> <10j4zhb9ge8ea.156spz1dkc4vb$.dlg@40tude.net> <6z9y05h0wes6$.126fz3zrcxvae$.dlg@40tude.net> NNTP-Posting-Host: 85.3.207.132 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: posting.google.com 1211714928 16097 127.0.0.1 (25 May 2008 11:28:48 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Sun, 25 May 2008 11:28:48 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: k37g2000hsf.googlegroups.com; posting-host=85.3.207.132; posting-account=bMuEOQoAAACUUr_ghL3RBIi5neBZ5w_S User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1.14) Gecko/20080404 Firefox/2.0.0.14,gzip(gfe),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:339 Date: 2008-05-25T04:28:47-07:00 List-Id: On 25 Maj, 10:12, "Dmitry A. Kazakov" wrote: > type X is record > A : Boolean := False; > B : Integer := 1; > C : Boolean := False; > end record; > > May the compiler group A and C and initialize both them by zeroing memory? > If the initialization order were fixed, that would be illegal to do. If there are no side effects (like I/O) associated with initialization of individual components, then you have no possibility to verify what is the actual order and the compiler should be allowed to do whatever it wants. Fixing the order of initialization and leaving some margin for optimizations do not conflict with each other. -- Maciej Sobczak * www.msobczak.com * www.inspirel.com