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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC,XPRIO autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,afb4d45672b1e262,start X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local01.nntp.dca.giganews.com!nntp.pipex.net!news.pipex.net.POSTED!not-for-mail NNTP-Posting-Date: Sat, 01 Apr 2006 07:47:53 -0600 Reply-To: "Doobs" From: "Doobs" Newsgroups: comp.lang.ada Subject: Any way of persuading GNAT/GCC to implement a true overlay and not a pointer? Date: Sat, 1 Apr 2006 14:47:59 +0100 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2527 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527 X-RFC2646: Format=Flowed; Original Message-ID: NNTP-Posting-Host: 85.210.60.99 X-Trace: sv3-DUbt6HM8rx4h3JAi5DB4BZF3lsUoxE8ReomYV50t1/tCYj4SZaQYlTIuOjJ5/domLHq2X4una3fWkHi!rX5QNiQ+4A6XD80riA/1AKAjUB7j01KwP65wRaPgZUAvZ8hgz49+EBZ7uI+mT9WxAGY4U28Cyy52!S9kIC6Md0Q== X-Complaints-To: abuse@dsl.pipex.net X-DMCA-Complaints-To: abuse@dsl.pipex.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.32 Xref: g2news1.google.com comp.lang.ada:3694 Date: 2006-04-01T14:47:59+01:00 List-Id: I was under the impression that code of the following form : X : ; Y : ; for Y'Address use X'Address; would result in an overlay in the resulting code. However on a project where external test equipment showed that the contents of X were NOT the same as Y I investigated further. I checked on both a Windows host version of GCC (3.4.2) and a target cross compiler (GCC 3.4.4) and on both the construct above is actually implemented using indirection (a pointer). The map file and symbol table show that irrespective of the data type and size of Y it is always implemented as a pointer to X. Although this appears semantially identical to an overlay as far as the progam is concerned it is NOT identical as far as an external observer is concerned. I have a bit packed record which I wanted to return as an array of longwords to pretty dumb test equipment. The easiest way *would* be to overlay a longword array - however this would not appear to be possible.....