Commit 13fa2acb by Arnaud Charlet

[multiple changes]

2014-10-23  Vincent Celier  <celier@adacore.com>

	* gnatls.adb: If --RTS= was not used, check if there is a default
	runtime. If there is none, in verbose mode, indicate that the
	default runtime is not available and show only the current
	directory in the source and the object search paths.

2014-10-23  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch6.adb (Process_Formals): A thunk procedure with a
	parameter of a limited view does not need a freeze node.

2014-10-23  Hristian Kirtchev  <kirtchev@adacore.com>

	* sem_ch7.adb (Analyze_Package_Body_Helper):
	The logic which hides local entities from external
	visibility is now contained in routine Hide_Public_Entities.
	(Hide_Public_Entities): New routine. Object and subprogram
	renamings are now hidden from external visibility the same way
	objects are.

2014-10-23  Ed Schonberg  <schonberg@adacore.com>

	* sem_attr.adb (Analyze_Attribute): The prefix of attribute Elaborated
	does not require freezing, in particular if it denotes a generic
	function.

From-SVN: r216585
parent b04d926e
2014-10-23 Vincent Celier <celier@adacore.com>
* gnatls.adb: If --RTS= was not used, check if there is a default
runtime. If there is none, in verbose mode, indicate that the
default runtime is not available and show only the current
directory in the source and the object search paths.
2014-10-23 Ed Schonberg <schonberg@adacore.com>
* sem_ch6.adb (Process_Formals): A thunk procedure with a
parameter of a limited view does not need a freeze node.
2014-10-23 Hristian Kirtchev <kirtchev@adacore.com>
* sem_ch7.adb (Analyze_Package_Body_Helper):
The logic which hides local entities from external
visibility is now contained in routine Hide_Public_Entities.
(Hide_Public_Entities): New routine. Object and subprogram
renamings are now hidden from external visibility the same way
objects are.
2014-10-23 Ed Schonberg <schonberg@adacore.com>
* sem_attr.adb (Analyze_Attribute): The prefix of attribute Elaborated
does not require freezing, in particular if it denotes a generic
function.
2014-10-23 Yannick Moy <moy@adacore.com> 2014-10-23 Yannick Moy <moy@adacore.com>
* sem_prag.adb (Analyze_Pragma/Pragma_Inline & Pragma_Inline_Always): * sem_prag.adb (Analyze_Pragma/Pragma_Inline & Pragma_Inline_Always):
......
...@@ -65,6 +65,9 @@ procedure Gnatls is ...@@ -65,6 +65,9 @@ procedure Gnatls is
No_Obj : aliased String := "<no_obj>"; No_Obj : aliased String := "<no_obj>";
No_Runtime : Boolean := False;
-- Set to True if there is no default runtime and --RTS= is not specified
type File_Status is ( type File_Status is (
OK, -- matching timestamp OK, -- matching timestamp
Checksum_OK, -- only matching checksum Checksum_OK, -- only matching checksum
...@@ -1631,10 +1634,37 @@ begin ...@@ -1631,10 +1634,37 @@ begin
Osint.Add_Default_Search_Dirs; Osint.Add_Default_Search_Dirs;
-- If --RTS= is not specified, check if there is a default runtime
if RTS_Specified = null then
declare
Text : Source_Buffer_Ptr;
Hi : Source_Ptr;
begin
Name_Buffer (1 .. 10) := "system.ads";
Name_Len := 10;
Read_Source_File (Name_Find, Lo => 0, Hi => Hi, Src => Text);
if Text = null then
No_Runtime := True;
end if;
end;
end if;
if Verbose_Mode then if Verbose_Mode then
Write_Eol; Write_Eol;
Display_Version ("GNATLS", "1997"); Display_Version ("GNATLS", "1997");
Write_Eol; Write_Eol;
if No_Runtime then
Write_Str
("Default runtime not available. Use --RTS= with a valid runtime");
Write_Eol;
Write_Eol;
end if;
Write_Str ("Source Search Path:"); Write_Str ("Source Search Path:");
Write_Eol; Write_Eol;
...@@ -1643,14 +1673,15 @@ begin ...@@ -1643,14 +1673,15 @@ begin
if Dir_In_Src_Search_Path (J)'Length = 0 then if Dir_In_Src_Search_Path (J)'Length = 0 then
Write_Str ("<Current_Directory>"); Write_Str ("<Current_Directory>");
else Write_Eol;
elsif not No_Runtime then
Write_Str Write_Str
(Normalize (Normalize
(To_Host_Dir_Spec (To_Host_Dir_Spec
(Dir_In_Src_Search_Path (J).all, True).all)); (Dir_In_Src_Search_Path (J).all, True).all));
Write_Eol;
end if; end if;
Write_Eol;
end loop; end loop;
Write_Eol; Write_Eol;
...@@ -1663,14 +1694,15 @@ begin ...@@ -1663,14 +1694,15 @@ begin
if Dir_In_Obj_Search_Path (J)'Length = 0 then if Dir_In_Obj_Search_Path (J)'Length = 0 then
Write_Str ("<Current_Directory>"); Write_Str ("<Current_Directory>");
else Write_Eol;
elsif not No_Runtime then
Write_Str Write_Str
(Normalize (Normalize
(To_Host_Dir_Spec (To_Host_Dir_Spec
(Dir_In_Obj_Search_Path (J).all, True).all)); (Dir_In_Obj_Search_Path (J).all, True).all));
Write_Eol;
end if; end if;
Write_Eol;
end loop; end loop;
Write_Eol; Write_Eol;
......
...@@ -11164,7 +11164,16 @@ package body Sem_Attr is ...@@ -11164,7 +11164,16 @@ package body Sem_Attr is
-- Normally the Freezing is done by Resolve but sometimes the Prefix -- Normally the Freezing is done by Resolve but sometimes the Prefix
-- is not resolved, in which case the freezing must be done now. -- is not resolved, in which case the freezing must be done now.
Freeze_Expression (P); -- For an elaboration check on a subprogram, we do not freeze its type.
-- It may be declared in an unrelated scope, in particular in the case
-- of a generic function whose type may remain unelaborated.
if Attr_Id = Attribute_Elaborated then
null;
else
Freeze_Expression (P);
end if;
-- Finally perform static evaluation on the attribute reference -- Finally perform static evaluation on the attribute reference
......
...@@ -9946,7 +9946,9 @@ package body Sem_Ch6 is ...@@ -9946,7 +9946,9 @@ package body Sem_Ch6 is
-- (Note that the same is done for controlling access -- (Note that the same is done for controlling access
-- parameter cases in function Access_Definition.) -- parameter cases in function Access_Definition.)
Set_Has_Delayed_Freeze (Current_Scope); if not Is_Thunk (Current_Scope) then
Set_Has_Delayed_Freeze (Current_Scope);
end if;
end if; end if;
end if; end if;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment