Skip to content

Commit

Permalink
Fix compilation with CE 2020
Browse files Browse the repository at this point in the history
  • Loading branch information
mosteo committed Feb 16, 2024
1 parent b78d9d5 commit a368931
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/alr/alr-commands.adb
Original file line number Diff line number Diff line change
Expand Up @@ -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;

---------
Expand Down

0 comments on commit a368931

Please sign in to comment.