comp.lang.ada
 help / color / mirror / Atom feed
From: Adam Beneschan <adambeneschan@gmail.com>
Subject: Re: Type Transcriptions
Date: Mon, 21 Apr 2014 15:46:31 -0700 (PDT)
Date: 2014-04-21T15:46:31-07:00	[thread overview]
Message-ID: <55d2bc64-c77c-410f-8002-131a10128aa4@googlegroups.com> (raw)
In-Reply-To: <87ha5m1kyc.fsf@ludovic-brenta.org>

On Monday, April 21, 2014 1:33:47 PM UTC-7, Ludovic Brenta wrote:
 
> In this case, Ada 2012 saves the day!

Maybe it saved the day in your case, but it's not applicable to the OP's needs.  Unchecked_Union is really only for variant records (since it was intended to provide a way to interface to C routines that need "union" types).  The rules say that Unchecked_Union may apply only to a variant record type, and the discriminant can't be used as a constraint on a component except for another Unchecked_Union record--definitely not on an array subtype which is what the OP would need.  (RM B.3.3(8))

Also, Unchecked_Unions were added in Ada 2005, not 2012.  (In Ada 2005, it was a pragma.)

                         -- Adam

  reply	other threads:[~2014-04-21 22:46 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-21  7:21 Type Transcriptions Shark8
2014-04-21 16:54 ` Brad Moore
2014-04-21 18:11   ` Yannick Duchêne (Hibou57)
2014-04-21 18:51     ` Shark8
2014-04-21 19:42       ` Jeffrey Carter
2014-04-22  6:06         ` Shark8
2014-04-21 20:33       ` Ludovic Brenta
2014-04-21 22:46         ` Adam Beneschan [this message]
2014-04-22  8:57         ` Shark8
replies disabled

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