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,5d4ade2fd8fd67c6 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news3.google.com!feeder2.cambriumusenet.nl!feeder1.cambriumusenet.nl!feed.tweaknews.nl!193.201.147.78.MISMATCH!feeder.news-service.com!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: Brian Drummond Newsgroups: comp.lang.ada Subject: Re: Legit Warnings or not Date: Thu, 21 Jul 2011 09:50:26 +0000 (UTC) Organization: A noiseless patient Spider Message-ID: References: <531193e0-3305-4292-9ed8-0176226c1d00@x12g2000yql.googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Injection-Date: Thu, 21 Jul 2011 09:50:26 +0000 (UTC) Injection-Info: mx04.eternal-september.org; posting-host="t4cb7N24pei7wVW7iCONQQ"; logging-data="9042"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+6iJ330wUgVi8h0Tn4aJipqzd9LXmLBM0=" User-Agent: Pan/0.134 (Wait for Me; GIT cb32159 master) Cancel-Lock: sha1:VKVjBz99CbkzWZHQ0vi8BTAODhY= Xref: g2news2.google.com comp.lang.ada:21234 Date: 2011-07-21T09:50:26+00:00 List-Id: On Wed, 20 Jul 2011 19:37:48 -0700, Jeffrey Carter wrote: > On 07/20/2011 03:30 PM, Anh Vo wrote: >> package Warnings_Legit is >> >> type Warned_Person (Size : Positive := 10) is -- Warnings issued >> here >> record >> Name : String (1 .. Size); >> end record; > some compilers not only won't give any warning, > but a declaration of > > X : Warned_Person; > > will not raise Storage_Error on those compilers, either. [...] > The harder way only allocates enough space for the current value, and > actually changes the space of the object if the size is changed through > an assignment. > > Some who have gone to the trouble to implement the 2nd way say they > think it was the intention of the language designers. Interesting. Do you mean they allocate a new object? Then how do they handle the following declarations X : aliased Warned_Person; Y : access Warned_Person := X'access; when X.Name is resized? - Brian