https://gcc.gnu.org/g:166f95a8b71901c7743753da8ac3df4d2bd878e0

commit r17-813-g166f95a8b71901c7743753da8ac3df4d2bd878e0
Author: Ronan Desplanques <[email protected]>
Date:   Mon Feb 16 15:21:18 2026 +0100

    ada: Fix System.Interrupt_Names generation on VxWorks
    
    The spec of Ada.Interrupts.Names for VxWorks (and RTEMS) contains a
    subtype declaration. This is a deviation from the Ada reference manual
    and the sed script used to generate System.Interrupt_Names failed to
    handle it. This patch fixes this.
    
    gcc/ada/ChangeLog:
    
            * xsintnam.sed: Handle special case.

Diff:
---
 gcc/ada/xsintnam.sed | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/gcc/ada/xsintnam.sed b/gcc/ada/xsintnam.sed
index 3e083788fb27..5684439e0ab6 100644
--- a/gcc/ada/xsintnam.sed
+++ b/gcc/ada/xsintnam.sed
@@ -10,3 +10,15 @@ s/end Ada.Interrupts.Names/end System.Interrupt_Names/g
 
 #Update the copyright header.
 /A D A . I N T E R R U P T S . N A M E S/c --                S Y S T E M . I N 
T E R R U P T S _ N A M E S             --
+
+#The VxWorks and RTEMS versions of Ada.Interrupts.Names define a 
Hardware_Interrupts
+#subtype that references Interrupt_ID. Filter the subtype definition.
+/   subtype Hardware_Interrupts is Interrupt_ID/d
+/     range Interrupt_ID'First .. System.OS_Interface.Max_HW_Interrupt;/d
+/   --  Range of values that can be used for hardware interrupts/d
+
+#The VxWorks and RTEMS versions of Ada.Interrupts.Names also don't define any
+#interrupt constants, so just removing the subtype declaration we get an 
"unused
+#with clause" warning. Silence it.
+/with System.OS_Interface;/i pragma Warnings (Off);
+/with System.OS_Interface;/a pragma Warnings (On);

Reply via email to