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,9fb8e2af320d5b3e X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews.google.com!x35g2000prf.googlegroups.com!not-for-mail From: Adam Beneschan Newsgroups: comp.lang.ada Subject: Re: Bus error Date: Fri, 29 Jun 2007 09:59:22 -0700 Organization: http://groups.google.com Message-ID: <1183136362.395300.27850@x35g2000prf.googlegroups.com> References: <1182954233.788124.17920@c77g2000hse.googlegroups.com> <1182959120.13096.8.camel@kartoffel> <1182964748.689146.52490@c77g2000hse.googlegroups.com> <1183061209.600996.74710@k79g2000hse.googlegroups.com> <1183104348.439715.173430@q75g2000hsh.googlegroups.com> <4684d358$0$14887$9b4e6d93@newsspool4.arcor-online.net> NNTP-Posting-Host: 66.126.103.122 Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" X-Trace: posting.google.com 1183136362 13337 127.0.0.1 (29 Jun 2007 16:59:22 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Fri, 29 Jun 2007 16:59:22 +0000 (UTC) In-Reply-To: <4684d358$0$14887$9b4e6d93@newsspool4.arcor-online.net> User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.7.12) Gecko/20050922 Fedora/1.7.12-1.3.1,gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: x35g2000prf.googlegroups.com; posting-host=66.126.103.122; posting-account=cw1zeQwAAABOY2vF_g6V_9cdsyY_wV9w Xref: g2news1.google.com comp.lang.ada:16344 Date: 2007-06-29T09:59:22-07:00 List-Id: On Jun 29, 2:42 am, Georg Bauhaus wrote: > Maciej Sobczak wrote: > > > Yes, or even stricter: > > > with Ada.Finalization; use Ada; > > package P is > > type T (<>) is limited private; > > private > > type T is new Finalization.Limited_Controlled with ...; > > end P; > > > which prevents uninitialized objects. > > Uhm, it prevents uninitialized objects that cannot otherwise > have default initialisation (e.g. from function calls whose > results are assigned to components), or initialisation via Initialize. > Such as records that need their components initialised with > values known only at run time *and* defined at library level etc. I'm not sure what you mean here... For packages that can only see the partial view of T, T is an indefinite type, and you cannot declare a variable of type T without an initialization expression (3.3.1(5)). I think that's what Maciej was referring to. (Yes, a private child package of P could declare a variable of type T without an initializer, but I don't think he was referring to those.) -- Adam