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,92a027c293f03acb X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news2.google.com!news.glorb.com!newscon02.news.prodigy.net!prodigy.net!newsfeed-00.mathworks.com!nntp.TheWorld.com!not-for-mail From: Robert A Duff Newsgroups: comp.lang.ada Subject: Re: Workqueues in Ada Date: Sat, 28 Jul 2007 17:38:28 -0400 Organization: The World Public Access UNIX, Brookline, MA Message-ID: References: NNTP-Posting-Host: shell01.theworld.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: pcls4.std.com 1185658708 12409 192.74.137.71 (28 Jul 2007 21:38:28 GMT) X-Complaints-To: abuse@TheWorld.com NNTP-Posting-Date: Sat, 28 Jul 2007 21:38:28 +0000 (UTC) User-Agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.3 (irix) Cancel-Lock: sha1:j2ReCcye0WFbERpkJwIOv907Z4c= Xref: g2news2.google.com comp.lang.ada:1251 Date: 2007-07-28T17:38:28-04:00 List-Id: Wiktor Moskwa writes: > On 28.07.2007, Robert A Duff wrote: >> Wiktor Moskwa writes: >>> GNAT GPL 2007 outputs: >>> ====== >>> (Ada 2005) cannot copy object of a limited type (RM-2005 6.5(5.5/2)) >>> consider switching to return of access type >>> ===== >> >> I would be very interested in seeing the code that causes this. > > Here you are: Well, thanks, but I really meant I'd like to see which part of PragmARC is causing trouble. I assume the following is a cut-down example, right? What about it, Jeff? Do you plan to update your components to be Ada 2005 compatible? > ====== > procedure Sample is > > generic > type Element is limited private; > package Pkg is > function Get return Element; > end Pkg; > > package body Pkg is > Item : Element; > > function Get return Element is > begin > return Item; Right, this is illegal in Ada 2005. The fix is probably to remove "limited" from Element, above, but I'd have to see the actual code to be sure. The compiler suggests, "consider switching to return of access type", but I think that's bogus. Note that in Ada 95, the above "return" has some rather strange behavior in some cases. Still, the fact that it was legal Ada, and is now illegal, is rather annoying. - Bob P.S. I was one of the people who worked on implementing the new Ada 2005 limited-types stuff in GNAT.