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 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: "G.B." Newsgroups: comp.lang.ada Subject: Interrupt_Handler and "directly specified" Date: Fri, 20 Nov 2015 19:33:52 +0100 Organization: A noiseless patient Spider Message-ID: Reply-To: nonlegitur@futureapps.de Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Fri, 20 Nov 2015 18:31:32 -0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="b96887e80893c84a90c3007226ca0d1c"; logging-data="19801"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18EMxVbuB7M7Hw1uuZzqiopRE/yQvHVjfE=" User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 X-Mozilla-News-Host: news://news.arcor.de:119 Cancel-Lock: sha1:PDHADLhpc5ltm2/V/Rxd5R2dejw= Xref: news.eternal-september.org comp.lang.ada:28478 Date: 2015-11-20T19:33:52+01:00 List-Id: For a protected handler, I had specified an aspect, procedure On_1 with Interrupt_Handler => True; and got a strange compiler diagnostic, listed below. Is the above syntax correct? I could drop " => True" and the compiler seemed happy. OTOH, the RM states, in C.3.1 6.2/3, that "if not directly specified, the aspect is False". I don't know what "directly specified" in RM C.3.1 means, exactly. Does it mean just specified as opposed to no such aspect specified (in source, near it)? So drop "=> ..." for truth? The pragma version of Interrupt_Handler seems to support this view in that it has only one argument, the procedure name. But the mention of "False" in the RM lets me ask. The example: $ PATH=/opt/GNAT2015/bin:$PATH gcc -c -gnatlv -gnatwa parent.ads parent-admin.adb GNAT GPL 2015 (20150428-49) Copyright 1992-2015, Free Software Foundation, Inc. Compiling: parent.ads Source file time stamp: 2015-11-20 18:10:41 Compiled at: 2015-11-20 19:18:28 1. package Parent is 2. private 3. end Parent; 3 lines: No errors GNAT GPL 2015 (20150428-49) Copyright 1992-2015, Free Software Foundation, Inc. Compiling: parent-admin.adb Source file time stamp: 2015-11-20 18:18:17 Compiled at: 2015-11-20 19:18:28 1. 2. package body Parent.Admin is 3. 4. protected body P1 is 5. 6. procedure On_1 | >>> expected type "System.Interrupts.Dynamic_Interrupt_Protection" >>> found private type "System.Tasking.Protected_Objects.Protection" 7. is begin 8. null; 9. end On_1; 10. 11. end P1; 12. 13. end Parent.Admin; Compiling: parent-admin.ads Source file time stamp: 2015-11-20 18:18:10 Compiled at: 2015-11-20 19:18:28 1. 2. package Parent.Admin is 3. 4. protected P1 is 5. 6. procedure On_1 7. with Interrupt_Handler => True; 8. 9. end P1; 10. 11. end Parent.Admin; 13 lines: 2 errors