comp.lang.ada
 help / color / mirror / Atom feed
From: "Alejandro R. Mosteo" <alejandro@mosteo.com>
Subject: Re: Storage_Error: mine's or gnat's fault?
Date: Sun, 5 Jun 2016 16:05:51 +0200
Date: 2016-06-05T16:05:51+02:00	[thread overview]
Message-ID: <nj1bj8$vn1$1@dont-email.me> (raw)
In-Reply-To: <lyporwpz49.fsf@pushface.org>

On 04/06/16 20:50, Simon Wright wrote:
> "Alejandro R. Mosteo" <alejandro@mosteo.com> writes:
>
>> Using the Indefinite_Doubly_Linked_List the problem is equally suspect
>> (this is code from a-cidlli.adb):
>>
>>     function First_Element (Container : List) return Element_Type is
>>     begin
>>        if Checks and then Container.First = null then
>>           raise Constraint_Error with "list is empty";
>>        end if;
>>
>>        return Container.First.Element.all; -- <-- RAISES
>>     end First_Element;
>
> For info, in Ada.Containers.Helpers.Generic_Implementation,
> in a-conhel.ads,
>
>        Checks : constant Boolean := Container_Checks'Enabled;
>
> And, using Gautier's example, on OS X, neither FSF GCC 6.1.0 nor GNAT
> GPL 2016 show the problem (a-cidlli.adb is the same in both compilers
> bar the runtime exception, so they are clearly of a similar vintage).

Thanks for the info, although I don't think I'm suppressing any checks, 
but I will double-check (ha).

Álex.

      reply	other threads:[~2016-06-05 14:05 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-03 21:01 Storage_Error: mine's or gnat's fault? Alejandro R. Mosteo
2016-06-03 21:43 ` Alejandro R. Mosteo
2016-06-03 22:45   ` Jeffrey R. Carter
2016-06-03 22:48     ` Jeffrey R. Carter
2016-06-04 18:50   ` Simon Wright
2016-06-05 14:05     ` 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