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!feeder.eternal-september.org!gandalf.srv.welterde.de!news.jacob-sparre.dk!franka.jacob-sparre.dk!pnx.dk!.POSTED.rrsoftware.com!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Error: allocation from empty storage pool Date: Thu, 12 Jul 2018 16:08:03 -0500 Organization: JSA Research & Innovation Message-ID: References: Injection-Date: Thu, 12 Jul 2018 21:08:03 -0000 (UTC) Injection-Info: franka.jacob-sparre.dk; posting-host="rrsoftware.com:24.196.82.226"; logging-data="16998"; mail-complaints-to="news@jacob-sparre.dk" X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Response X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.7246 Xref: reader02.eternal-september.org comp.lang.ada:53782 Date: 2018-07-12T16:08:03-05:00 List-Id: "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. Randy.