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,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 Path: border1.nntp.dca3.giganews.com!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!goblin2!goblin.stu.neva.ru!aioe.org!.POSTED!not-for-mail From: =?utf-8?Q?Yannick_Duch=C3=AAne_=28Hibou57?= =?utf-8?Q?=29?= Newsgroups: comp.lang.ada Subject: Re: Allocators and the requirement to raise `Storage_Error` Date: Fri, 03 May 2013 10:36:22 +0200 Organization: Ada @ Home Message-ID: References: <0cd370b8-d798-4080-b346-00b1527362e8@googlegroups.com> NNTP-Posting-Host: nReaOVWq/ugo3wZUL0F24Q.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes Content-Transfer-Encoding: Quoted-Printable X-Complaints-To: abuse@aioe.org User-Agent: Opera Mail/12.15 (Linux) X-Notice: Filtered by postfilter v. 0.8.2 X-Original-Bytes: 2237 Xref: number.nntp.dca.giganews.com comp.lang.ada:181378 Date: 2013-05-03T10:36:22+02:00 List-Id: Le Fri, 03 May 2013 09:31:56 +0200, egilhh a =C3= =A9crit: > On Friday, May 3, 2013 7:35:29 AM UTC+2, Hibou57 (Yannick Duch=C3=AAne= ) wrote: >> ARM 2012 @4.8 says: >> >> >> >> http://www.ada-auth.org/standards/12rm/html/RM-4-8.html >> >> > For an allocator with a subtype_indication, the >> >> > subtype_indication shall not specify a null_exclusion >> > > This Ada Issue may clear things up for you: > http://www.ada-auth.org/cgi-bin/cvsweb.cgi/ai05s/ai05-0104-1.txt?rev=3D= 1.4 > > Basically, you have an access to an access, allocated with the default= = > value, > which is null for non-initialized access values. You're right, that's obvious. I badly understand reading that part: it w= as = about the subtype of the allocated object, not of the returned access ty= pe. I still wonder why there is no provision for an allocator to return `nul= l` = instead of raising an exception, when a custom function of a constrained= = subtype/type, which would provide the same functionality, does not get = imposed this obligation. -- = =E2=80=9CSyntactic sugar causes cancer of the semi-colons.=E2=80=9D [1] =E2=80=9CStructured Programming supports the law of the excluded muddle.= =E2=80=9D [1] [1]: Epigrams on Programming =E2=80=94 Alan J. =E2=80=94 P. Yale Univers= ity