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-Thread: 103376,74166d5f7afa0c82 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!fu-berlin.de!newsfeed.vmunix.org!newsfeed.cwix.com!news.binc.net!kilgallen From: Kilgallen@SpamCop.net (Larry Kilgallen) Newsgroups: comp.lang.ada Subject: Re: Return_By_Reference or Return_By_Copy (GNAT bug?) Date: 3 Jan 2005 22:20:33 -0600 Organization: LJK Software Message-ID: <$xgF7TJy$z4V@eisner.encompasserve.org> References: NNTP-Posting-Host: eisner.encompasserve.org X-Trace: grandcanyon.binc.net 1104812405 15448 192.135.80.34 (4 Jan 2005 04:20:05 GMT) X-Complaints-To: abuse@binc.net NNTP-Posting-Date: Tue, 4 Jan 2005 04:20:05 +0000 (UTC) Xref: g2news1.google.com comp.lang.ada:7421 Date: 2005-01-03T22:20:33-06:00 List-Id: In article , "Randy Brukardt" writes: > "Duncan Sands" wrote in message > news:mailman.21.1104616882.527.comp.lang.ada@ada-france.org... >> 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. > > ... > ... >> package body B is >> >> The_A : A_Type; >> >> function Get_The_A return A_Type is >> begin >> return The_A; > > -- This return will be illegal in Ada 2005 (the return expression is not an > aggregate or function call). Even though nothing in that sample says protected ?