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 autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,29c1212970bb6877 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!news-FFM2.ecrc.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!newsmm00.sul.t-online.de!t-online.de!news.t-online.com!not-for-mail From: Martin Krischik Newsgroups: comp.lang.ada Subject: Re: String Pointer Bug Date: Tue, 09 Nov 2004 20:35:00 +0100 Organization: None Message-ID: <7563511.QXIkeEXOyb@linux1.krischik.com> References: <35f054ea.0411090847.668b8d4e@posting.google.com> Reply-To: martin@krischik.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Trace: news.t-online.com 1100030892 03 27697 ah9xXz1roYOf+jy 041109 20:08:12 X-Complaints-To: usenet-abuse@t-online.de X-ID: XNbXZZZD8eEbMgqUx+LXxcrIsTNayhsuJ4EVQwAqJF2+j+3q0Vs28j User-Agent: KNode/0.8.0 Xref: g2news1.google.com comp.lang.ada:6094 Date: 2004-11-09T20:35:00+01:00 List-Id: skidmarks wrote: > "Christoph Karl Walter Grein" wrote in message > news:... >> A long time ago, I made an exegesis of this problem. You may find it >> below (sorry if the indentation should be lost, it's my mailer that >> swallows it, I do not know to avoid this): > > Thank you. This is an excellent description. the only (fault) that I > can see is that it requires a copy operation (Y: aliased D := X). > > I wonder, do you think that: > > Y: aliased D; for Y'Address use X'Address; > > is a viable alternative (please note, I did not say GOOD alternative). for Y'Address use X'Address; is an form of Unchecked_Unchecked_Conversion or on C++ talk a reinterpret_cast - the kind of convertion where no, absolutely no, check is done. Is is a solution where either performace is on the essence or nothing else goes. But yes it is a solution. Viable? Well, your decision. With Regards Martin PS: I did use Y'Address use X'Address; once for converting C <-> Ada strings where I wanted better performace then Interfaces.C. -- mailto://krischik@users.sourceforge.net http://www.ada.krischik.com