Commit 9fe2f33e by Arnaud Charlet

[multiple changes]

2009-11-30  Gary Dismukes  <dismukes@adacore.com>

	* sem_prag.adb (Process_Convention): Change formal E to Ent. In the
	case where the pragma's entity argument is a renaming, return the
	entity denoted by the renaming rather than the renamed entity. Loop
	through the homonyms of the original argument entity, rather than the
	homonyms of any renamed entity. Correct call to Generate_Entity to
	pass the homonym.

2009-11-30  Vincent Celier  <celier@adacore.com>

	* impunit.adb: Add packages that were added to the GNAT library:
	GNAT.SHA224, GNAT.SHA256, GNAT.SHA384 and GNAT.SHA512.
	* s-sechas.adb (Fill_Buffer_Copy): Fixes incorrect slice index

2009-11-30  Robert Dewar  <dewar@adacore.com>

	* exp_ch3.adb: Minor reformatting
	* g-md5.ads, g-sha1.ads: Add comment.

From-SVN: r154815
parent fed1bd44
2009-11-30 Gary Dismukes <dismukes@adacore.com>
* sem_prag.adb (Process_Convention): Change formal E to Ent. In the
case where the pragma's entity argument is a renaming, return the
entity denoted by the renaming rather than the renamed entity. Loop
through the homonyms of the original argument entity, rather than the
homonyms of any renamed entity. Correct call to Generate_Entity to
pass the homonym.
2009-11-30 Vincent Celier <celier@adacore.com>
* impunit.adb: Add packages that were added to the GNAT library:
GNAT.SHA224, GNAT.SHA256, GNAT.SHA384 and GNAT.SHA512.
* s-sechas.adb (Fill_Buffer_Copy): Fixes incorrect slice index
2009-11-30 Robert Dewar <dewar@adacore.com>
* exp_ch3.adb: Minor reformatting
* g-md5.ads, g-sha1.ads: Add comment.
2009-11-30 Arnaud Charlet <charlet@adacore.com> 2009-11-30 Arnaud Charlet <charlet@adacore.com>
* gcc-interface/Makefile.in: Remove handling of libgccprefix, no longer * gcc-interface/Makefile.in: Remove handling of libgccprefix, no longer
......
...@@ -8104,8 +8104,7 @@ package body Exp_Ch3 is ...@@ -8104,8 +8104,7 @@ package body Exp_Ch3 is
elsif Restriction_Active (No_Finalization) then elsif Restriction_Active (No_Finalization) then
null; null;
-- We skip these for CIL Value types, where finalization is not -- Skip these for CIL Value types, where finalization is not available
-- available
elsif Is_Value_Type (Tag_Typ) then elsif Is_Value_Type (Tag_Typ) then
null; null;
......
...@@ -31,6 +31,8 @@ ...@@ -31,6 +31,8 @@
-- -- -- --
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
-- Why is this package undocumented ???
with System.Secure_Hashes.MD5; with System.Secure_Hashes.MD5;
package GNAT.MD5 is new System.Secure_Hashes.H package GNAT.MD5 is new System.Secure_Hashes.H
(Block_Words => System.Secure_Hashes.MD5.Block_Words, (Block_Words => System.Secure_Hashes.MD5.Block_Words,
......
...@@ -31,6 +31,8 @@ ...@@ -31,6 +31,8 @@
-- -- -- --
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
-- Why no documentation ???
with System.Secure_Hashes.SHA1; with System.Secure_Hashes.SHA1;
package GNAT.SHA1 is new System.Secure_Hashes.H package GNAT.SHA1 is new System.Secure_Hashes.H
(Block_Words => System.Secure_Hashes.SHA1.Block_Words, (Block_Words => System.Secure_Hashes.SHA1.Block_Words,
......
...@@ -263,6 +263,10 @@ package body Impunit is ...@@ -263,6 +263,10 @@ package body Impunit is
"g-sercom", -- GNAT.Serial_Communications "g-sercom", -- GNAT.Serial_Communications
"g-sestin", -- GNAT.Secondary_Stack_Info "g-sestin", -- GNAT.Secondary_Stack_Info
"g-sha1 ", -- GNAT.SHA1 "g-sha1 ", -- GNAT.SHA1
"g-sha224", -- GNAT.SHA224
"g-sha256", -- GNAT.SHA256
"g-sha384", -- GNAT.SHA384
"g-sha512", -- GNAT.SHA512
"g-signal", -- GNAT.Signals "g-signal", -- GNAT.Signals
"g-socket", -- GNAT.Sockets "g-socket", -- GNAT.Sockets
"g-souinf", -- GNAT.Source_Info "g-souinf", -- GNAT.Source_Info
......
...@@ -85,7 +85,7 @@ package body System.Secure_Hashes is ...@@ -85,7 +85,7 @@ package body System.Secure_Hashes is
pragma Assert (Length > 0); pragma Assert (Length > 0);
Buf_String (M.Last + 1 .. M.Last + Length) := Buf_String (M.Last + 1 .. M.Last + Length) :=
S (First .. First + Length); S (First .. First + Length - 1);
M.Last := M.Last + Length; M.Last := M.Last + Length;
Last := First + Length - 1; Last := First + Length - 1;
end Fill_Buffer_Copy; end Fill_Buffer_Copy;
......
...@@ -596,11 +596,12 @@ package body Sem_Prag is ...@@ -596,11 +596,12 @@ package body Sem_Prag is
procedure Process_Compile_Time_Warning_Or_Error; procedure Process_Compile_Time_Warning_Or_Error;
-- Common processing for Compile_Time_Error and Compile_Time_Warning -- Common processing for Compile_Time_Error and Compile_Time_Warning
procedure Process_Convention (C : out Convention_Id; E : out Entity_Id); procedure Process_Convention
(C : out Convention_Id; Ent : out Entity_Id);
-- Common processing for Convention, Interface, Import and Export. -- Common processing for Convention, Interface, Import and Export.
-- Checks first two arguments of pragma, and sets the appropriate -- Checks first two arguments of pragma, and sets the appropriate
-- convention value in the specified entity or entities. On return -- convention value in the specified entity or entities. On return
-- C is the convention, E is the referenced entity. -- C is the convention, Ent is the referenced entity.
procedure Process_Extended_Import_Export_Exception_Pragma procedure Process_Extended_Import_Export_Exception_Pragma
(Arg_Internal : Node_Id; (Arg_Internal : Node_Id;
...@@ -2347,10 +2348,11 @@ package body Sem_Prag is ...@@ -2347,10 +2348,11 @@ package body Sem_Prag is
------------------------ ------------------------
procedure Process_Convention procedure Process_Convention
(C : out Convention_Id; (C : out Convention_Id;
E : out Entity_Id) Ent : out Entity_Id)
is is
Id : Node_Id; Id : Node_Id;
E : Entity_Id;
E1 : Entity_Id; E1 : Entity_Id;
Cname : Name_Id; Cname : Name_Id;
Comp_Unit : Unit_Number_Type; Comp_Unit : Unit_Number_Type;
...@@ -2482,6 +2484,10 @@ package body Sem_Prag is ...@@ -2482,6 +2484,10 @@ package body Sem_Prag is
E := Entity (Id); E := Entity (Id);
-- Set entity to return
Ent := E;
-- Go to renamed subprogram if present, since convention applies to -- Go to renamed subprogram if present, since convention applies to
-- the actual renamed entity, not to the renaming entity. If the -- the actual renamed entity, not to the renaming entity. If the
-- subprogram is inherited, go to parent subprogram. -- subprogram is inherited, go to parent subprogram.
...@@ -2504,6 +2510,10 @@ package body Sem_Prag is ...@@ -2504,6 +2510,10 @@ package body Sem_Prag is
and then Scope (E) = Scope (Alias (E)) and then Scope (E) = Scope (Alias (E))
then then
E := Alias (E); E := Alias (E);
-- Return the parent subprogram the entity was inherited from
Ent := E;
end if; end if;
end if; end if;
...@@ -2617,7 +2627,9 @@ package body Sem_Prag is ...@@ -2617,7 +2627,9 @@ package body Sem_Prag is
Generate_Reference (E, Id, 'b'); Generate_Reference (E, Id, 'b');
end if; end if;
E1 := E; -- Loop through the homonyms of the pragma argument's entity
E1 := Ent;
loop loop
E1 := Homonym (E1); E1 := Homonym (E1);
exit when No (E1) or else Scope (E1) /= Current_Scope; exit when No (E1) or else Scope (E1) /= Current_Scope;
...@@ -2642,7 +2654,7 @@ package body Sem_Prag is ...@@ -2642,7 +2654,7 @@ package body Sem_Prag is
Set_Convention_From_Pragma (E1); Set_Convention_From_Pragma (E1);
if Prag_Id = Pragma_Import then if Prag_Id = Pragma_Import then
Generate_Reference (E, Id, 'b'); Generate_Reference (E1, Id, 'b');
end if; end if;
end if; end if;
end loop; end loop;
...@@ -3459,6 +3471,8 @@ package body Sem_Prag is ...@@ -3459,6 +3471,8 @@ package body Sem_Prag is
else else
Set_Imported (Def_Id); Set_Imported (Def_Id);
-- Reject an Import applied to an abstract subprogram
if Is_Subprogram (Def_Id) if Is_Subprogram (Def_Id)
and then Is_Abstract_Subprogram (Def_Id) and then Is_Abstract_Subprogram (Def_Id)
then then
......
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