From: Ronan Desplanques <[email protected]>
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.
Tested on x86_64-pc-linux-gnu, committed on master.
---
gcc/ada/xsintnam.sed | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/gcc/ada/xsintnam.sed b/gcc/ada/xsintnam.sed
index 3e083788fb2..5684439e0ab 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);
--
2.53.0