https://gcc.gnu.org/g:a10cacb164d0f941120157f101a6505b1e0b80ba
commit r16-8994-ga10cacb164d0f941120157f101a6505b1e0b80ba Author: Ronan Desplanques <[email protected]> Date: Tue Jan 27 12:56:42 2026 +0100 ada: Align VxWorks version of System.Interrupts A recent minor fix to the main System.Interrupts was omitted for the VxWorks-specific version. This patch fixes this. gcc/ada/ChangeLog: * libgnarl/s-interr__vxworks.adb (Unprotected_Exchange_Handler): Fix exception message. Diff: --- gcc/ada/libgnarl/s-interr__vxworks.adb | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/gcc/ada/libgnarl/s-interr__vxworks.adb b/gcc/ada/libgnarl/s-interr__vxworks.adb index 035d7bac8bf6..9d5ab389758f 100644 --- a/gcc/ada/libgnarl/s-interr__vxworks.adb +++ b/gcc/ada/libgnarl/s-interr__vxworks.adb @@ -866,20 +866,22 @@ package body System.Interrupts is -- We don't check anything if Restoration is True, since we may be -- detaching a static handler to restore a dynamic one. - if not Restoration and then not Static - and then (User_Handler (Interrupt).Static - + if not Restoration and then not Static then -- Trying to overwrite a static Interrupt Handler with a dynamic -- Handler + if User_Handler (Interrupt).Static then + raise Program_Error + with + "trying to overwrite a static Interrupt Handler with a " + & "dynamic handler"; + end if; - -- The new handler is not specified as an Interrupt Handler by a - -- pragma. - - or else not Is_Registered (New_Handler)) - then - raise Program_Error with - "trying to overwrite a static interrupt handler with a " - & "dynamic handler"; + -- The new handler is not specified as an interrupt handler by an + -- aspect (see the second sentence of RM C.3.2 (17/3)). + if not Is_Registered (New_Handler) then + raise Program_Error + with "trying to attach procedure without Interrupt_Handler"; + end if; end if; -- Save the old handler
