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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,13f10cac2d21b84f X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-04-30 11:21:04 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!cyclone.bc.net!sunqbc.risq.qc.ca!newspeer.monmouth.com!newscon02.news.prodigy.com!newsmst01.news.prodigy.com!prodigy.com!postmaster.news.prodigy.com!newssvr21.news.prodigy.com.POSTED!not-for-mail From: tmoran@acm.org Newsgroups: comp.lang.ada Subject: Re: Is this a GNAT bug??? References: X-Newsreader: Tom's custom newsreader Message-ID: <9gBz8.4053$451.2378814669@newssvr21.news.prodigy.com> NNTP-Posting-Host: 64.175.241.1 X-Complaints-To: abuse@prodigy.net X-Trace: newssvr21.news.prodigy.com 1020190853 ST000 64.175.241.1 (Tue, 30 Apr 2002 14:20:53 EDT) NNTP-Posting-Date: Tue, 30 Apr 2002 14:20:53 EDT Organization: Prodigy Internet http://www.prodigy.com X-UserInfo1: TSU[@SVGXZUWSVPXN[O@_WH@YR_B@EXLLBWLOOAFEQR@ETUCCNSKQFCY@TXDX_WHSVB]ZEJLSNY\^J[CUVSA_QLFC^RQHUPH[P[NRWCCMLSNPOD_ESALHUK@TDFUZHBLJ\XGKL^NXA\EVHSP[D_C^B_^JCX^W]CHBAX]POG@SSAZQ\LE[DCNMUPG_VSC@VJM Date: Tue, 30 Apr 2002 18:20:53 GMT Xref: archiver1.google.com comp.lang.ada:23288 Date: 2002-04-30T18:20:53+00:00 List-Id: > type Message_Type_Access is access Message_Type; > function Get_Message_Data is new Unchecked_Conversion > (SOURCE => System.ADDRESS, > TARGET => Message_Type_Access); This is not good Ada. You almost certainly want to convert an access type for one way of looking at the data to an access type for a different way. No "system.address" involved. If, most unusually, you actually do need to convert a System.Address to an access type, use the standard System.Address_To_Access_Conversions, which is defined exactly for that purpose, and which the compiler will implement so it actually works. There is no reason to assume an unchecked conversion from System.Address to an access type will work as you hope.