[Ada] Make tools compatible with No_Dynamic_Accessibility_Checks

gcc/ada/

	* make.adb, osint.adb: Make code compatible with
	No_Dynamic_Accessibility_Checks restriction.
This commit is contained in:
Arnaud Charlet 2021-05-24 07:07:49 -04:00 committed by Pierre-Marie de Rodat
parent 79a8b14237
commit 3cb32058b4
2 changed files with 8 additions and 6 deletions

View File

@ -2364,7 +2364,7 @@ package body Make is
Osint.Full_Source_Name Osint.Full_Source_Name
(Source.File, (Source.File,
Full_File => Full_Source_File, Full_File => Full_Source_File,
Attr => Source_File_Attr'Access); Attr => Source_File_Attr'Unchecked_Access);
Lib_File := Osint.Lib_File_Name (Source.File, Source.Index); Lib_File := Osint.Lib_File_Name (Source.File, Source.Index);
@ -2392,7 +2392,7 @@ package body Make is
Get_Name_String (Full_Lib_File); Get_Name_String (Full_Lib_File);
Name_Buffer (Name_Len + 1) := ASCII.NUL; Name_Buffer (Name_Len + 1) := ASCII.NUL;
Read_Only := not Is_Writable_File Read_Only := not Is_Writable_File
(Name_Buffer'Address, Lib_File_Attr'Access); (Name_Buffer'Address, Lib_File_Attr'Unchecked_Access);
else else
Read_Only := False; Read_Only := False;
end if; end if;
@ -2460,7 +2460,7 @@ package body Make is
The_Args => Args, The_Args => Args,
Lib_File => Lib_File, Lib_File => Lib_File,
Full_Lib_File => Full_Lib_File, Full_Lib_File => Full_Lib_File,
Lib_File_Attr => Lib_File_Attr'Access, Lib_File_Attr => Lib_File_Attr'Unchecked_Access,
Read_Only => Read_Only, Read_Only => Read_Only,
ALI => ALI, ALI => ALI,
O_File => Obj_File, O_File => Obj_File,
@ -2630,7 +2630,8 @@ package body Make is
Text := Text :=
Read_Library_Info_From_Full Read_Library_Info_From_Full
(Data.Full_Lib_File, Data.Lib_File_Attr'Access); (Data.Full_Lib_File,
Data.Lib_File_Attr'Unchecked_Access);
-- Restore Check_Object_Consistency to its initial value -- Restore Check_Object_Consistency to its initial value

View File

@ -1915,7 +1915,8 @@ package body Osint is
begin begin
if Opt.Look_In_Primary_Dir then if Opt.Look_In_Primary_Dir then
Locate_File Locate_File
(N, Source, Primary_Directory, File_Name, File, Attr'Access); (N, Source, Primary_Directory, File_Name, File,
Attr'Unchecked_Access);
if File /= No_File and then T = File_Stamp (N) then if File /= No_File and then T = File_Stamp (N) then
return File; return File;
@ -1925,7 +1926,7 @@ package body Osint is
Last_Dir := Src_Search_Directories.Last; Last_Dir := Src_Search_Directories.Last;
for D in Primary_Directory + 1 .. Last_Dir loop for D in Primary_Directory + 1 .. Last_Dir loop
Locate_File (N, Source, D, File_Name, File, Attr'Access); Locate_File (N, Source, D, File_Name, File, Attr'Unchecked_Access);
if File /= No_File and then T = File_Stamp (File) then if File /= No_File and then T = File_Stamp (File) then
return File; return File;