comp.lang.ada
 help / color / mirror / Atom feed
From: Simon Wright <simon@pushface.org>
Subject: Re: Potential Coextension Bug in GNAT
Date: Thu, 20 Dec 2018 16:56:11 +0000
Date: 2018-12-20T16:56:11+00:00	[thread overview]
Message-ID: <lyefacdtn8.fsf@pushface.org> (raw)
In-Reply-To: f8aca7a2-3b3a-4934-8219-c2961dc79458@googlegroups.com

Jere <jhb.chat@gmail.com> writes:

> I was messing around and trying to learn coextensions and
> I came across some counter intuitive functionality.  If I
> directly initialize one via an aggregate, it works fine.
> However, if I initialize through a constructing function, 
> it seems to treat the access discriminant as a normal access
> type and finalizes it at the end of the program instead of
> when the object leaves scope.

Compiling with -gnatwa I see "warning: coextension will not be finalized
when its associated owner is deallocated or finalized", so GNAT clearly
meant to do it!

  parent reply	other threads:[~2018-12-20 16:56 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-20 15:59 Potential Coextension Bug in GNAT Jere
2018-12-20 16:02 ` Jere
2018-12-20 16:56 ` Simon Wright [this message]
2018-12-21  2:16   ` Randy Brukardt
2018-12-21 11:24   ` Jere
2018-12-20 17:58 ` Simon Wright
2018-12-21  2:25   ` Randy Brukardt
2018-12-21 11:32     ` Jere
replies disabled

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