comp.lang.ada
 help / color / mirror / Atom feed
From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: Error: allocation from empty storage pool
Date: Thu, 12 Jul 2018 16:08:03 -0500
Date: 2018-07-12T16:08:03-05:00	[thread overview]
Message-ID: <pi8fvj$gj6$1@franka.jacob-sparre.dk> (raw)
In-Reply-To: pi7gmk$riu$1@dont-email.me

"Alejandro R. Mosteo" <alejandro@mosteo.com> 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.


  reply	other threads:[~2018-07-12 21:08 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-12  9:50 Error: allocation from empty storage pool Alejandro R. Mosteo
2018-07-12 11:41 ` Simon Wright
2018-07-12 12:14   ` Alejandro R. Mosteo
2018-07-12 21:08     ` Randy Brukardt [this message]
2018-07-13  8:02       ` Alejandro R. Mosteo
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox