2
0
mirror of git://gcc.gnu.org/git/gcc.git synced 2025-04-10 03:20:27 +08:00

[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
This commit is contained in:
Arnaud Charlet 2009-11-30 15:57:12 +01:00
parent fed1bd444d
commit 9fe2f33eb2
7 changed files with 50 additions and 9 deletions

@ -1,3 +1,23 @@
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>
* gcc-interface/Makefile.in: Remove handling of libgccprefix, no longer

@ -8104,8 +8104,7 @@ package body Exp_Ch3 is
elsif Restriction_Active (No_Finalization) then
null;
-- We skip these for CIL Value types, where finalization is not
-- available
-- Skip these for CIL Value types, where finalization is not available
elsif Is_Value_Type (Tag_Typ) then
null;

@ -31,6 +31,8 @@
-- --
------------------------------------------------------------------------------
-- Why is this package undocumented ???
with System.Secure_Hashes.MD5;
package GNAT.MD5 is new System.Secure_Hashes.H
(Block_Words => System.Secure_Hashes.MD5.Block_Words,

@ -31,6 +31,8 @@
-- --
------------------------------------------------------------------------------
-- Why no documentation ???
with System.Secure_Hashes.SHA1;
package GNAT.SHA1 is new System.Secure_Hashes.H
(Block_Words => System.Secure_Hashes.SHA1.Block_Words,

@ -263,6 +263,10 @@ package body Impunit is
"g-sercom", -- GNAT.Serial_Communications
"g-sestin", -- GNAT.Secondary_Stack_Info
"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-socket", -- GNAT.Sockets
"g-souinf", -- GNAT.Source_Info

@ -85,7 +85,7 @@ package body System.Secure_Hashes is
pragma Assert (Length > 0);
Buf_String (M.Last + 1 .. M.Last + Length) :=
S (First .. First + Length);
S (First .. First + Length - 1);
M.Last := M.Last + Length;
Last := First + Length - 1;
end Fill_Buffer_Copy;

@ -596,11 +596,12 @@ package body Sem_Prag is
procedure Process_Compile_Time_Warning_Or_Error;
-- 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.
-- Checks first two arguments of pragma, and sets the appropriate
-- 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
(Arg_Internal : Node_Id;
@ -2347,10 +2348,11 @@ package body Sem_Prag is
------------------------
procedure Process_Convention
(C : out Convention_Id;
E : out Entity_Id)
(C : out Convention_Id;
Ent : out Entity_Id)
is
Id : Node_Id;
E : Entity_Id;
E1 : Entity_Id;
Cname : Name_Id;
Comp_Unit : Unit_Number_Type;
@ -2482,6 +2484,10 @@ package body Sem_Prag is
E := Entity (Id);
-- Set entity to return
Ent := E;
-- Go to renamed subprogram if present, since convention applies to
-- the actual renamed entity, not to the renaming entity. If the
-- subprogram is inherited, go to parent subprogram.
@ -2504,6 +2510,10 @@ package body Sem_Prag is
and then Scope (E) = Scope (Alias (E))
then
E := Alias (E);
-- Return the parent subprogram the entity was inherited from
Ent := E;
end if;
end if;
@ -2617,7 +2627,9 @@ package body Sem_Prag is
Generate_Reference (E, Id, 'b');
end if;
E1 := E;
-- Loop through the homonyms of the pragma argument's entity
E1 := Ent;
loop
E1 := Homonym (E1);
exit when No (E1) or else Scope (E1) /= Current_Scope;
@ -2642,7 +2654,7 @@ package body Sem_Prag is
Set_Convention_From_Pragma (E1);
if Prag_Id = Pragma_Import then
Generate_Reference (E, Id, 'b');
Generate_Reference (E1, Id, 'b');
end if;
end if;
end loop;
@ -3459,6 +3471,8 @@ package body Sem_Prag is
else
Set_Imported (Def_Id);
-- Reject an Import applied to an abstract subprogram
if Is_Subprogram (Def_Id)
and then Is_Abstract_Subprogram (Def_Id)
then