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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,afb4d45672b1e262 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews.google.com!j33g2000cwa.googlegroups.com!not-for-mail From: "Gerd" Newsgroups: comp.lang.ada Subject: Re: Any way of persuading GNAT/GCC to implement a true overlay and not a pointer? Date: 3 Apr 2006 05:25:21 -0700 Organization: http://groups.google.com Message-ID: <1144067121.410425.172200@j33g2000cwa.googlegroups.com> References: <87odzl5ilt.fsf@mid.deneb.enyo.de> NNTP-Posting-Host: 62.225.152.1 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: posting.google.com 1144067126 5930 127.0.0.1 (3 Apr 2006 12:25:26 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Mon, 3 Apr 2006 12:25:26 +0000 (UTC) In-Reply-To: User-Agent: G2/0.2 X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727),gzip(gfe),gzip(gfe) X-HTTP-Via: 1.0 cnbg-vw47.cnbg.de:8080 (Squid/2.4.STABLE7) Complaints-To: groups-abuse@google.com Injection-Info: j33g2000cwa.googlegroups.com; posting-host=62.225.152.1; posting-account=_FaVAg0AAAAYUPoPAQYNRFF35JBHf9i7 Xref: g2news1.google.com comp.lang.ada:3713 Date: 2006-04-03T05:25:21-07:00 List-Id: Why not use an overlayed record for your data, something like this: procedure Overlay is -- your X type Sometype is record x: integer; y: integer; end record; type Othertype is array (1..2) of Integer; -- your Y type OVL (b: Boolean) is record case b is when true => s : Sometype; when false => o : Othertype; end case; end record; for OVL use record s at 0 range 0..63; o at 0 range 0..63; b at 8 range 0..7; end record; data : OVL ( b=>true ); -- data with Y and X at the same address begin null; end Overlay;