aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2009-11-30 15:57:12 +0100
committerArnaud Charlet <charlet@gcc.gnu.org>2009-11-30 15:57:12 +0100
commit9fe2f33eb2083f4786d350e131131612067f0649 (patch)
treefc216054c779f709a8d552e138cb70cecb931336
parentfed1bd444da9836b5fa33d72ba5c938b451df44a (diff)
downloadgcc-9fe2f33eb2083f4786d350e131131612067f0649.zip
gcc-9fe2f33eb2083f4786d350e131131612067f0649.tar.gz
gcc-9fe2f33eb2083f4786d350e131131612067f0649.tar.bz2
[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
-rw-r--r--gcc/ada/ChangeLog20
-rw-r--r--gcc/ada/exp_ch3.adb3
-rw-r--r--gcc/ada/g-md5.ads2
-rw-r--r--gcc/ada/g-sha1.ads2
-rw-r--r--gcc/ada/impunit.adb4
-rw-r--r--gcc/ada/s-sechas.adb2
-rw-r--r--gcc/ada/sem_prag.adb26
7 files changed, 50 insertions, 9 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 5b1bd9a..d15cb8b 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -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
diff --git a/gcc/ada/exp_ch3.adb b/gcc/ada/exp_ch3.adb
index 17e6395..f61a4a5 100644
--- a/gcc/ada/exp_ch3.adb
+++ b/gcc/ada/exp_ch3.adb
@@ -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;
diff --git a/gcc/ada/g-md5.ads b/gcc/ada/g-md5.ads
index f9047c3..ec37642 100644
--- a/gcc/ada/g-md5.ads
+++ b/gcc/ada/g-md5.ads
@@ -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,
diff --git a/gcc/ada/g-sha1.ads b/gcc/ada/g-sha1.ads
index e6c1bc7..a7d8e4c 100644
--- a/gcc/ada/g-sha1.ads
+++ b/gcc/ada/g-sha1.ads
@@ -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,
diff --git a/gcc/ada/impunit.adb b/gcc/ada/impunit.adb
index 4264a5a..0f3ad57 100644
--- a/gcc/ada/impunit.adb
+++ b/gcc/ada/impunit.adb
@@ -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
diff --git a/gcc/ada/s-sechas.adb b/gcc/ada/s-sechas.adb
index 7b84c3f..09036f3 100644
--- a/gcc/ada/s-sechas.adb
+++ b/gcc/ada/s-sechas.adb
@@ -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;
diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb
index 7343986..cccc198 100644
--- a/gcc/ada/sem_prag.adb
+++ b/gcc/ada/sem_prag.adb
@@ -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