comp.lang.ada
 help / color / mirror / Atom feed
From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: why can't we declare unconstrained objects ?
Date: Wed, 15 Dec 2004 15:47:59 -0600
Date: 2004-12-15T15:47:59-06:00	[thread overview]
Message-ID: <K-6dnQQAB7lcLV3cRVn-vQ@megapath.net> (raw)
In-Reply-To: 2004121508394116807%david@bottoncom

"David Botton" <david@botton.com> wrote in message
news:2004121508394116807%david@bottoncom...
> Here is an example from GNATCOM (http://www.gnavi.org) of a C/C++ style
union
...

Note that pragma Unchecked_Union is in Ada 2005, and several compilers
already support it. But if you're not using one of them, you can't do it
this way.

Our experience with Claw was that there wasn't many cases where you really
needed a Union. Most of the time, careful declarations avoided the need.
When we really did need a Union, we used Unchecked_Conversion. YMMV.

                                Randy.





      reply	other threads:[~2004-12-15 21:47 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-12-12 15:43 why can't we declare unconstrained objects ? Michael Mounteney
2004-12-12 17:39 ` Martin Krischik
2004-12-12 17:47 ` Dmitry A. Kazakov
2004-12-12 18:21 ` Martin Dowie
2004-12-12 18:40   ` Jeffrey Carter
2004-12-12 19:24     ` Dmitry A. Kazakov
2004-12-15 13:39 ` David Botton
2004-12-15 21:47   ` Randy Brukardt [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