comp.lang.ada
 help / color / mirror / Atom feed
* Interrupt_Handler and "directly specified"
@ 2015-11-20 18:33 G.B.
  2015-11-20 19:22 ` Simon Wright
  2015-11-20 21:25 ` Randy Brukardt
  0 siblings, 2 replies; 4+ messages in thread
From: G.B. @ 2015-11-20 18:33 UTC (permalink / raw)


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


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-11-22  9:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-20 18:33 Interrupt_Handler and "directly specified" G.B.
2015-11-20 19:22 ` Simon Wright
2015-11-20 21:25 ` Randy Brukardt
2015-11-22  9:59   ` Georg Bauhaus

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox