comp.lang.ada
 help / color / mirror / Atom feed
From: "Alejandro R. Mosteo" <alejandro@mosteo.com>
Subject: Re: Error: allocation from empty storage pool
Date: Fri, 13 Jul 2018 10:02:45 +0200
Date: 2018-07-13T10:02:45+02:00	[thread overview]
Message-ID: <pi9mb5$v0n$1@dont-email.me> (raw)
In-Reply-To: <pi8fvj$gj6$1@franka.jacob-sparre.dk>

On 12/07/2018 23:08, Randy Brukardt wrote:
> "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.

I reported it yesterday and I just got confirmation that it is a bug.

Thanks,
Álex.

> 
>                                            Randy.
> 
> 

      reply	other threads:[~2018-07-13  8:02 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
2018-07-13  8:02       ` Alejandro R. Mosteo [this message]
replies disabled

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