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=-2.4 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI autolearn=unavailable autolearn_force=no version=3.4.4 X-Google-Thread: 103376,74166d5f7afa0c82 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!newsread.com!news-xfer.newsread.com!newspeer.monmouth.com!colt.net!easynet-quince!easynet.net!teaser.fr!enst.fr!melchior!cuivre.fr.eu.org!melchior.frmug.org!not-for-mail From: Duncan Sands Newsgroups: comp.lang.ada Subject: Re: Return_By_Reference or Return_By_Copy (GNAT bug?) Date: Sat, 8 Jan 2005 14:06:02 +0100 Organization: Cuivre, Argent, Or Message-ID: References: NNTP-Posting-Host: lovelace.ada-france.org Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Trace: melchior.cuivre.fr.eu.org 1105189580 68286 212.85.156.195 (8 Jan 2005 13:06:20 GMT) X-Complaints-To: usenet@melchior.cuivre.fr.eu.org NNTP-Posting-Date: Sat, 8 Jan 2005 13:06:20 +0000 (UTC) Cc: Randy Brukardt To: comp.lang.ada@ada-france.org Return-Path: User-Agent: KMail/1.6.2 In-Reply-To: Content-Disposition: inline X-Virus-Scanned: by amavisd-new-20030616-p10 (Debian) at ada-france.org X-BeenThere: comp.lang.ada@ada-france.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Gateway to the comp.lang.ada Usenet newsgroup" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Xref: g2news1.google.com comp.lang.ada:7566 Date: 2005-01-08T14:06:02+01:00 Hi Randy, > > I was playing around with return by reference to see if it is possible to > > get unserialized access to a protected variable using the Rosen trick (it > is, > > see example below, especially the protected object P in package C). Will > this > > be illegal in Ada 2005? > > Yes, it will. it seems to be legal to have a protected procedure pass out an access to a protected variable, allowing that variable to be accessed without serialisation. I somehow expected this to be illegal... Is there any legitimate use for it? Thanks, Duncan.