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 Path: g2news1.google.com!postnews.google.com!u6g2000prc.googlegroups.com!not-for-mail From: Adam Beneschan Newsgroups: comp.lang.ada Subject: Re: Legit Warnings or not Date: Thu, 21 Jul 2011 08:28:14 -0700 (PDT) Organization: http://groups.google.com Message-ID: <3e8384ce-e18a-4d84-95d7-f4eb750b16c9@u6g2000prc.googlegroups.com> References: <531193e0-3305-4292-9ed8-0176226c1d00@x12g2000yql.googlegroups.com> NNTP-Posting-Host: 66.126.103.122 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1311262094 3123 127.0.0.1 (21 Jul 2011 15:28:14 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Thu, 21 Jul 2011 15:28:14 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: u6g2000prc.googlegroups.com; posting-host=66.126.103.122; posting-account=duW0ogkAAABjRdnxgLGXDfna0Gc6XqmQ User-Agent: G2/1.0 X-Google-Web-Client: true X-Google-Header-Order: ARLUEHNKC X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; WOW64; Trident/4.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.5.21022; .NET CLR 3.5.30729; .NET CLR 3.0.30618; .NET4.0C),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:20272 Date: 2011-07-21T08:28:14-07:00 List-Id: On Jul 21, 2:50=A0am, Brian Drummond wrote: > 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 > > >> =A0 =A0 type Warned_Person (Size : Positive :=3D 10) is -- Warnings is= sued > >> here > >> =A0 =A0 =A0 =A0record > >> =A0 =A0 =A0 =A0 =A0 Name : String (1 .. Size); > >> =A0 =A0 =A0 =A0end 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 =A0 > =A0 =A0X : aliased Warned_Person; > =A0 =A0Y : access Warned_Person :=3D X'access; > when X.Name is resized? You don't have to allocate a whole new Warned_Person, just a new Name. -- Adam