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,d50803f457a25d9 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!news.glorb.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local1.nntp.dca.giganews.com!nntp.megapath.net!news.megapath.net.POSTED!not-for-mail NNTP-Posting-Date: Mon, 19 Jul 2004 18:54:50 -0500 From: "Randy Brukardt" Newsgroups: comp.lang.ada References: <1udKc.98748$dP1.333832@newsc.telia.net> Subject: Re: GtkAda Problem Date: Mon, 19 Jul 2004 18:55:28 -0500 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4807.1700 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300 Message-ID: NNTP-Posting-Host: 64.32.209.38 X-Trace: sv3-gvNl07WiE1XlMWQqrFgNzw6p5/k/Z7YcxxJMBpOJE6TOaAQFStgtHPd7EufwAHJpTRt7KKFzEVFLOua!/My9BS14D/VYv6fZ0YoqBBJrAHVg9LXqgtM/QiW8GIEZf3CUsZd/esB+C+LmmSARjIrn9SFTVtHf X-Complaints-To: abuse@megapath.net X-DMCA-Complaints-To: abuse@megapath.net X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.1 Xref: g2news1.google.com comp.lang.ada:2257 Date: 2004-07-19T18:55:28-05:00 List-Id: "Nick Roberts" wrote in message news:opsba3palkp4pfvb@bram-2... > On Sat, 17 Jul 2004 22:40:16 GMT, Jeffrey Carter wrote: > > > Nick Roberts wrote: > > > >> If it is possible to move fidle to a library-level package, fine. But > >> if it would be impractical to do so, I suspect using Unchecked_Access > >> is the best bet. > > > > 'Unchecked_Access is not defined for subprograms. > > Silly me. You're right. The weird thing is that I've used Unchecked_Access > with GNAT (interfacing to Windows). I guess GNAT just allows it. Or was it > Unchecked_Address? My memory is not very good. I'm very sorry for any > confusion caused. > > I think compilers should provide a non-standard mode permitting > Unchecked_Access for subprograms, since it's obviously needed sometimes; > this mode would be forbidden for safety-critical software. The Amendment provides anonymous access-to-subprogram types for this purpose. (They can't be mixed with named access-to-subprogram types to avoid problems). That would be the best way to solve this problem. Of course, you'd need an Ada 2005 compiler. (Note that the containers library uses anonymous access-to-subprogram rather than a generic to implement iterators, so this will show up sooner rather than later in compilers.) Randy.