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=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail From: "Alejandro R. Mosteo" Newsgroups: comp.lang.ada Subject: Re: Error: allocation from empty storage pool Date: Fri, 13 Jul 2018 10:02:45 +0200 Organization: A noiseless patient Spider Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Date: Fri, 13 Jul 2018 08:02:45 -0000 (UTC) Injection-Info: reader02.eternal-september.org; posting-host="480174b3d0a72037b2e1995c2889adb2"; logging-data="31767"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18FVV5Ez2oK4par+GOYwyP4" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 Cancel-Lock: sha1:jI8Jx0IV1FQlhjlT+afb/1Lkvw4= In-Reply-To: Content-Language: en-US Xref: reader02.eternal-september.org comp.lang.ada:53784 Date: 2018-07-13T10:02:45+02:00 List-Id: On 12/07/2018 23:08, Randy Brukardt wrote: > "Alejandro R. Mosteo" wrote in message > news:pi7gmk$riu$1@dont-email.me... > ... >> I was thinking that maybe the pragma works at the access type level >> instead of actual allocations. That is, any access type without >> 'Storage_size => 0 or explicit allocator would fail. But reading 13.11.3 >> 6/3 it seems that it is the other way around: at the point of the access >> type declaration either default 'Storage_Size or 'Storage_Pool is >> determined depending on the Default_Storage_Pool value. Though I am not a >> l-lawyer so... > > Correct. But note that when Default_Storage_Pool is null, then Storage_Size > => 0. When Storage_Size is statically zero, allocators are illegal > (4.8(5.4/3)), as are calls on instances of Unchecked_Deallocation > (13.11.2(3.1/3)). It's allowed to declare such types, so that one can use > 'Access to give them values. > > I don't see any language reason for an allocator to be used in your example, > so I concur that there is a GNAT bug involved. I reported it yesterday and I just got confirmation that it is a bug. Thanks, Álex. > > Randy. > >