aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRobert Dewar <dewar@adacore.com>2012-03-15 08:46:38 +0000
committerArnaud Charlet <charlet@gcc.gnu.org>2012-03-15 09:46:38 +0100
commit4fa04e5c038a44a685c00c7ded09b82d8fb2b1bf (patch)
treea07adbc6a18b17c2ca26d18265eb7f111094d09c /gcc
parentb763dcaaec9267f0b46019a9f4d83bf37e616385 (diff)
downloadgcc-4fa04e5c038a44a685c00c7ded09b82d8fb2b1bf.zip
gcc-4fa04e5c038a44a685c00c7ded09b82d8fb2b1bf.tar.gz
gcc-4fa04e5c038a44a685c00c7ded09b82d8fb2b1bf.tar.bz2
sem_ch6.ads: Minor comment updates.
2012-03-15 Robert Dewar <dewar@adacore.com> * sem_ch6.ads: Minor comment updates. * sem_ch12.adb: Minor comment clarification. From-SVN: r185412
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ada/ChangeLog5
-rw-r--r--gcc/ada/sem_ch12.adb8
-rw-r--r--gcc/ada/sem_ch6.ads12
3 files changed, 19 insertions, 6 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 7835dc1..7ef46d5 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,5 +1,10 @@
2012-03-15 Robert Dewar <dewar@adacore.com>
+ * sem_ch6.ads: Minor comment updates.
+ * sem_ch12.adb: Minor comment clarification.
+
+2012-03-15 Robert Dewar <dewar@adacore.com>
+
* sem_ch5.adb: Minor reformatting.
2012-03-15 Ed Schonberg <schonberg@adacore.com>
diff --git a/gcc/ada/sem_ch12.adb b/gcc/ada/sem_ch12.adb
index e873025..b411b3b 100644
--- a/gcc/ada/sem_ch12.adb
+++ b/gcc/ada/sem_ch12.adb
@@ -10433,9 +10433,11 @@ package body Sem_Ch12 is
Abandon_Instantiation (Actual);
end if;
- -- In Ada 2012, actuals for access_to_subprograms must be subtype
- -- conformant with the generic formal. Previous to AI05-288 only mode
- -- conformance was required.
+ -- In accordance with AI05-288 (which is an Ada 2012 AI that is a
+ -- binding intepretation to be applied to previous versions of Ada
+ -- as well as Ada 2012), actuals for access_to_subprograms must be
+ -- subtype conformant with the generic formal. Previous to AI05-288
+ -- only mode conformance was required.
Check_Subtype_Conformant
(Designated_Type (Act_T),
diff --git a/gcc/ada/sem_ch6.ads b/gcc/ada/sem_ch6.ads
index 42ea1e4..5d30df7 100644
--- a/gcc/ada/sem_ch6.ads
+++ b/gcc/ada/sem_ch6.ads
@@ -29,6 +29,7 @@ package Sem_Ch6 is
type Conformance_Type is
(Type_Conformant, Mode_Conformant, Subtype_Conformant, Fully_Conformant);
-- pragma Ordered (Conformance_Type);
+ -- Why is above line commented out ???
-- Conformance type used in conformance checks between specs and bodies,
-- and for overriding. The literals match the RM definitions of the
-- corresponding terms. This is an ordered type, since each conformance
@@ -149,7 +150,10 @@ package Sem_Ch6 is
-- on the appropriate component of the New_Id construct if not.
-- Skip_Controlling_Formals is True when checking the conformance of
-- a subprogram that implements an interface operation. In that case,
- -- only the non-controlling formals can (and must) be examined.
+ -- only the non-controlling formals can (and must) be examined. The
+ -- argument Get_Inst is set to True when this is a check against a
+ -- formal access-to-subprogram type, indicating that mapping of types
+ -- is needed.
procedure Check_Type_Conformant
(New_Id : Entity_Id;
@@ -167,8 +171,10 @@ package Sem_Ch6 is
Get_Inst : Boolean := False) return Boolean;
-- Check that the types of two formal parameters are conforming. In most
-- cases this is just a name comparison, but within an instance it involves
- -- generic actual types, and in the presence of anonymous access types it
- -- must examine the designated types.
+ -- generic actual types, and in the presence of anonymous access types
+ -- it must examine the designated types. The argument Get_Inst is set to
+ -- True when this is a check against a formal access-to-subprogram type,
+ -- indicating that mapping of types is needed.
procedure Create_Extra_Formals (E : Entity_Id);
-- For each parameter of a subprogram or entry that requires an additional