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,fba47412041a3607 X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!proxad.net!feeder1-2.proxad.net!newsfeed.straub-nv.de!noris.net!newsfeed.arcor.de!newsspool1.arcor-online.net!news.arcor.de.POSTED!not-for-mail Date: Mon, 17 Mar 2008 22:21:18 +0100 From: Georg Bauhaus Reply-To: rm.tsoh+bauhaus@maps.futureapps.de User-Agent: Thunderbird 2.0.0.12 (Windows/20080213) MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Differences with/without .all References: <647ktoF2acjggU1@mid.individual.net> <871w696pxz.fsf@ludovic-brenta.org> In-Reply-To: <871w696pxz.fsf@ludovic-brenta.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Message-ID: <47dee0cf$0$6740$9b4e6d93@newsspool3.arcor-online.net> Organization: Arcor NNTP-Posting-Date: 17 Mar 2008 22:21:19 CET NNTP-Posting-Host: 1cdac8d1.newsspool3.arcor-online.net X-Trace: DXC=H9IODQj3H1m<6cDJZfMd_cMcF=Q^Z^V3h4Fo<]lROoRa8kFejVhTYho5[aEhZi=TP9?fBR6Fo X-Complaints-To: usenet-abuse@arcor.de Xref: g2news1.google.com comp.lang.ada:20456 Date: 2008-03-17T22:21:19+01:00 List-Id: Ludovic Brenta wrote: > Alex R. Mosteo writes: >> protected type Safe; >> type Safe_Access is access all Safe; >> function S return Safe_Access; >> >> S.Some_Procedure; >> -- This fails with >> -- Prefix of protected procedure or entry call must be variable >> > The compiler is correct. > > 6.4(9): "When there is an actual_parameter_part, the prefix can be an > implicit_dereference of an access-to-subprogram value." I think the parameter profile of Some_Procedure isn't the issue here as Some_Procedure is just a procedure of Safe, but not an access to procedure. OTOH, S'Result points to a protected object and procedure Some_Procedure is invoked with this (variable) object. FWIW, another compiler is fine with the above.