aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2012-10-29 11:54:45 +0100
committerArnaud Charlet <charlet@gcc.gnu.org>2012-10-29 11:54:45 +0100
commitf0b741b6e73d812ddbe0c4f91154646cea567df3 (patch)
tree39c2d1f1c4154be2dfbde9d20e3aa72419f8c537
parentc18e9f65faeb5ea78af6d703c2e5b4e60de0485c (diff)
downloadgcc-f0b741b6e73d812ddbe0c4f91154646cea567df3.zip
gcc-f0b741b6e73d812ddbe0c4f91154646cea567df3.tar.gz
gcc-f0b741b6e73d812ddbe0c4f91154646cea567df3.tar.bz2
[multiple changes]
2012-10-29 Javier Miranda <miranda@adacore.com> * sem_ch3.adb (Derive_Progenitor_Subprograms): Disable small optimization in generic formal types. 2012-10-29 Robert Dewar <dewar@adacore.com> * exp_ch9.adb, exp_ch3.adb: Add comments. * sem_prag.adb: Minor reformatting. From-SVN: r192926
-rw-r--r--gcc/ada/ChangeLog10
-rw-r--r--gcc/ada/exp_ch3.adb5
-rw-r--r--gcc/ada/exp_ch9.adb5
-rw-r--r--gcc/ada/sem_ch3.adb18
-rw-r--r--gcc/ada/sem_disp.adb2
-rw-r--r--gcc/ada/sem_prag.adb11
6 files changed, 31 insertions, 20 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 7bc26c6..3d26ada 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,13 @@
+2012-10-29 Javier Miranda <miranda@adacore.com>
+
+ * sem_ch3.adb (Derive_Progenitor_Subprograms): Disable small
+ optimization in generic formal types.
+
+2012-10-29 Robert Dewar <dewar@adacore.com>
+
+ * exp_ch9.adb, exp_ch3.adb: Add comments.
+ * sem_prag.adb: Minor reformatting.
+
2012-10-29 Tristan Gingold <gingold@adacore.com>
* bindgen.adb (Gen_Output_File_Ada): Do not emit declaration for
diff --git a/gcc/ada/exp_ch3.adb b/gcc/ada/exp_ch3.adb
index 9911d21..5df52c1 100644
--- a/gcc/ada/exp_ch3.adb
+++ b/gcc/ada/exp_ch3.adb
@@ -1537,10 +1537,9 @@ package body Exp_Ch3 is
Append_To (Args, Make_Identifier (Loc, Name_uMaster));
end if;
- if not Restricted_Profile then
-
- -- No _Chain for restricted profile
+ -- Add _Chain (not done in the restricted profile because ???)
+ if not Restricted_Profile then
Append_To (Args, Make_Identifier (Loc, Name_uChain));
end if;
diff --git a/gcc/ada/exp_ch9.adb b/gcc/ada/exp_ch9.adb
index b39484f..94a71ff 100644
--- a/gcc/ada/exp_ch9.adb
+++ b/gcc/ada/exp_ch9.adb
@@ -911,7 +911,7 @@ package body Exp_Ch9 is
-- Start of processing for Build_Activation_Chain_Entity
begin
- -- Activation chain is never used in restricted profile
+ -- Activation chain is never used in restricted profile (why not???)
if Restricted_Profile then
return;
@@ -919,8 +919,7 @@ package body Exp_Ch9 is
Find_Enclosing_Context (N, Context, Context_Id, Decls);
- -- If an activation chain entity has not been declared already, create
- -- one.
+ -- If activation chain entity has not been declared already, create one
if Nkind (Context) = N_Extended_Return_Statement
or else No (Activation_Chain_Entity (Context))
diff --git a/gcc/ada/sem_ch3.adb b/gcc/ada/sem_ch3.adb
index 818bfd0..bb3937e 100644
--- a/gcc/ada/sem_ch3.adb
+++ b/gcc/ada/sem_ch3.adb
@@ -12804,16 +12804,18 @@ package body Sem_Ch3 is
-- done here because interfaces must be visible in the partial and
-- private view (RM 7.3(7.3/2)).
- -- Small optimization: This work is only required if the parent is
- -- abstract. If the tagged type is not abstract, it cannot have
- -- abstract primitives (the only entities in the list of primitives of
- -- non-abstract tagged types that can reference abstract primitives
- -- through its Alias attribute are the internal entities that have
- -- attribute Interface_Alias, and these entities are generated later
- -- by Add_Internal_Interface_Entities).
+ -- Small optimization: This work is only required if the parent
+ -- is abstract or a generic formal type. If the tagged type is not
+ -- abstract, it cannot have abstract primitives (the only entities
+ -- in the list of primitives of non-abstract tagged types that can
+ -- reference abstract primitives through its Alias attribute are the
+ -- internal entities that have attribute Interface_Alias, and these
+ -- entities are generated later by Add_Internal_Interface_Entities).
+ -- Need explanation for the generic case ???
if In_Private_Part (Current_Scope)
- and then Is_Abstract_Type (Parent_Type)
+ and then (Is_Abstract_Type (Parent_Type)
+ or else Is_Generic_Type (Parent_Type))
then
Elmt := First_Elmt (Primitive_Operations (Tagged_Type));
while Present (Elmt) loop
diff --git a/gcc/ada/sem_disp.adb b/gcc/ada/sem_disp.adb
index 988a78f..05eb502 100644
--- a/gcc/ada/sem_disp.adb
+++ b/gcc/ada/sem_disp.adb
@@ -840,7 +840,7 @@ package body Sem_Disp is
Tagged_Type := Find_Dispatching_Type (Subp);
-- Ada 2005 (AI-345): Use the corresponding record (if available).
- -- Required because primitives of concurrent types are be attached
+ -- Required because primitives of concurrent types are attached
-- to the corresponding record (not to the concurrent type).
if Ada_Version >= Ada_2005
diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb
index 1b49eeb..af5506a 100644
--- a/gcc/ada/sem_prag.adb
+++ b/gcc/ada/sem_prag.adb
@@ -6763,11 +6763,13 @@ package body Sem_Prag is
-- Assert/Assert_And_Cut --
---------------------------
- -- pragma Assert ([Check =>] Boolean_EXPRESSION
- -- [, [Message =>] Static_String_EXPRESSION]);
+ -- pragma Assert
+ -- ( [Check => ] Boolean_EXPRESSION
+ -- [, [Message =>] Static_String_EXPRESSION]);
- -- pragma Assert_And_Cut ([Check =>] Boolean_EXPRESSION
- -- [, [Message =>] Static_String_EXPRESSION]);
+ -- pragma Assert_And_Cut
+ -- ( [Check => ] Boolean_EXPRESSION
+ -- [, [Message =>] Static_String_EXPRESSION]);
when Pragma_Assert | Pragma_Assert_And_Cut => Assert : declare
Expr : Node_Id;
@@ -6776,7 +6778,6 @@ package body Sem_Prag is
begin
if Prag_Id = Pragma_Assert then
Ada_2005_Pragma;
-
else -- Pragma_Assert_And_Cut
GNAT_Pragma;
end if;