comp.lang.ada
 help / color / mirror / Atom feed
From: Simon Wright <simon@pushface.org>
Subject: Re: Possible GNAT bug, but wanted to see if it was a violtion of the RM
Date: Sun, 25 Feb 2018 11:55:11 +0000
Date: 2018-02-25T11:55:11+00:00	[thread overview]
Message-ID: <lyinaljnc0.fsf@pushface.org> (raw)
In-Reply-To: c002424a-b079-4fb9-894f-cccdd8ad9c3e@googlegroups.com

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

> Thanks!  That confirms my initial suspicion of it being related to
> tamper checks, but I can't figure out how.  I looked through the GNAT
> code and saw how they locked it in the Constant_Reference function,
> but I can't for the life of me figure out how calling it using:
>
>    Package.Operation(Object,Params).Discriminant
>
> would work differently than
>
>    Object.Operation(Params).Discriminant 
>
> for that function call.

Compiling with -gnatG (to list an Ada-like representation of what the
compiler has transformed your code into before it starts
optimisation/code generation) shows that the Package.Operation version
includes some finalization in Operation that's missing in the
Object.Operation version. Looks very like a bug!


  reply	other threads:[~2018-02-25 11:55 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-23  2:36 Possible GNAT bug, but wanted to see if it was a violtion of the RM Jere
2018-02-23  9:16 ` Simon Wright
2018-02-24 22:07   ` Jere
2018-02-25 11:55     ` Simon Wright [this message]
2018-02-25 15:55       ` Jere
2018-02-24 22:10   ` Jere
2018-02-25 11:50     ` Simon Wright
2018-02-25 15:22       ` 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