From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,e1e2bc096a996632 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!news.glorb.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local1.nntp.dca.giganews.com!nntp.megapath.net!news.megapath.net.POSTED!not-for-mail NNTP-Posting-Date: Wed, 15 Dec 2004 15:46:41 -0600 From: "Randy Brukardt" Newsgroups: comp.lang.ada References: <2004121508394116807%david@bottoncom> Subject: Re: why can't we declare unconstrained objects ? Date: Wed, 15 Dec 2004 15:47:59 -0600 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4807.1700 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300 Message-ID: NNTP-Posting-Host: 64.32.209.38 X-Trace: sv3-MG1J9qN+hsif/yguu0oTHawmm+8i4EK7a4mt6xdrEzEAQWV2kA/Qih/ejAIB1OphSBschfNUbzxTuWD!wgkBjRMFOpHCZIBCtihM8l06CkrpUKLQfJ1CEdGHQDEpiYRZpDt+IwFHWZxJ4i9tm+wiOKe80weP X-Complaints-To: abuse@megapath.net X-DMCA-Complaints-To: abuse@megapath.net X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.21 Xref: g2news1.google.com comp.lang.ada:6981 Date: 2004-12-15T15:47:59-06:00 List-Id: "David Botton" 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.