From a368931679ad0f88fde3822f3d4f72f0dfb4b1ba Mon Sep 17 00:00:00 2001 From: "Alejandro R. Mosteo" Date: Fri, 16 Feb 2024 11:16:33 +0100 Subject: [PATCH] Fix compilation with CE 2020 --- src/alr/alr-commands.adb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/alr/alr-commands.adb b/src/alr/alr-commands.adb index 1b5825a80..b3f2dddf3 100644 --- a/src/alr/alr-commands.adb +++ b/src/alr/alr-commands.adb @@ -591,10 +591,12 @@ package body Alr.Commands is end if; return R : constant Alire.Roots.Optional.Reference := - (Ptr => Cmd.Optional_Root.Value.Ptr.all'Unchecked_Access); + (Ptr => Cmd.Optional_Root.Value.Ptr.all'Unrestricted_Access); -- Workaround for bug (?) in GNAT 11 about dangling pointers. It should -- simply be: -- return Cmd.Optional_Root.Value; + -- Also, the 'Unrestricted is needed by GNAT CE 2020, it can be simply + -- 'Unchecked in later versions. end Root; ---------