]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
ada: Fix System.Interrupt_Names generation on VxWorks
authorRonan Desplanques <desplanques@adacore.com>
Mon, 16 Feb 2026 14:21:18 +0000 (15:21 +0100)
committerMarc Poulhiès <dkm@gcc.gnu.org>
Tue, 26 May 2026 13:24:13 +0000 (15:24 +0200)
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.

gcc/ada/xsintnam.sed

index 3e083788fb27a55f329e7ec3ca149c078b27af3a..5684439e0ab6644a62ab996e8711021a6a143831 100644 (file)
@@ -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);