Skip to content

Commit 766db65

Browse files
committed
Use pragma instead of aspect for Interrupt_Priority on Serial_Port
The definition of Serial_Port uses the aspect Interrupt_Priority taking a value from the specified discriminants. However the discriminant is not visible in this scope. Use a pragma in the definition of the type instead where the discriminant is visible. ref #466
1 parent 58cf84e commit 766db65

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

examples/shared/serial_ports/src/serial_io-nonblocking.ads

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,11 @@ private
7777
(Device : not null access USART;
7878
IRQ : Interrupt_ID;
7979
IRQ_Priority : Interrupt_Priority)
80-
with
81-
Interrupt_Priority => IRQ_Priority
8280
is
81+
pragma Interrupt_Priority (IRQ_Priority);
82+
-- FIXME: this is supposed to be an aspect, however with FSF GNAT 12
83+
-- the compiler does not have IRQ_Priority in scope when an aspect is
84+
-- used and rejects it.
8385

8486
procedure Start_Sending (Msg : not null access Message);
8587

0 commit comments

Comments
 (0)