aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRobert Dewar <dewar@adacore.com>2010-10-07 12:52:01 +0000
committerArnaud Charlet <charlet@gcc.gnu.org>2010-10-07 14:52:01 +0200
commit2bfb1b72beca469f8ef72ab0a62b5afef417c25d (patch)
treee4b62b7bfacf6412822c03330651316180cbd211 /gcc
parenta557f9cc0e269f9f66af1116980dc4c18ac983d4 (diff)
downloadgcc-2bfb1b72beca469f8ef72ab0a62b5afef417c25d.zip
gcc-2bfb1b72beca469f8ef72ab0a62b5afef417c25d.tar.gz
gcc-2bfb1b72beca469f8ef72ab0a62b5afef417c25d.tar.bz2
sem_ch12.adb: Add comment.
2010-10-07 Robert Dewar <dewar@adacore.com> * sem_ch12.adb: Add comment. * sem_ch6.adb: Minor reformatting. From-SVN: r165102
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ada/ChangeLog5
-rw-r--r--gcc/ada/sem_ch12.adb5
-rw-r--r--gcc/ada/sem_ch6.adb10
3 files changed, 14 insertions, 6 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 68b651d..06e0556 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,5 +1,10 @@
2010-10-07 Robert Dewar <dewar@adacore.com>
+ * sem_ch12.adb: Add comment.
+ * sem_ch6.adb: Minor reformatting.
+
+2010-10-07 Robert Dewar <dewar@adacore.com>
+
* par-ch3.adb, par-ch6.adb, par-ch7.adb, par-ch9.adb, par-ch10.adb: Add
Pexp to Pf_Rec constants
(P_Subprogram): Expression is always enclosed in parentheses
diff --git a/gcc/ada/sem_ch12.adb b/gcc/ada/sem_ch12.adb
index 7a2208e..0857991 100644
--- a/gcc/ada/sem_ch12.adb
+++ b/gcc/ada/sem_ch12.adb
@@ -2801,9 +2801,12 @@ package body Sem_Ch12 is
Result_Type := Access_Definition (Spec, Result_Definition (Spec));
Set_Etype (Id, Result_Type);
- -- Check restriction imposed by AI05-073 : a generic function
+ -- Check restriction imposed by AI05-073: a generic function
-- cannot return an abstract type or an access to such.
+ -- This is a binding interpreration should it apply to earlier
+ -- versions of Ada as well as Ada 2012???
+
if Is_Abstract_Type (Designated_Type (Result_Type))
and then Ada_Version >= Ada_12
then
diff --git a/gcc/ada/sem_ch6.adb b/gcc/ada/sem_ch6.adb
index 7be427e..fab0ba8 100644
--- a/gcc/ada/sem_ch6.adb
+++ b/gcc/ada/sem_ch6.adb
@@ -2957,13 +2957,13 @@ package body Sem_Ch6 is
-- Ada 2005 (AI-251): If the return type is abstract, verify that
-- the subprogram is abstract also. This does not apply to renaming
-- declarations, where abstractness is inherited.
+
-- In case of primitives associated with abstract interface types
-- the check is applied later (see Analyze_Subprogram_Declaration).
- if not Nkind_In (Parent (N),
- N_Subprogram_Renaming_Declaration,
- N_Abstract_Subprogram_Declaration,
- N_Formal_Abstract_Subprogram_Declaration)
+ if not Nkind_In (Parent (N), N_Subprogram_Renaming_Declaration,
+ N_Abstract_Subprogram_Declaration,
+ N_Formal_Abstract_Subprogram_Declaration)
then
if Is_Abstract_Type (Etype (Designator))
and then not Is_Interface (Etype (Designator))
@@ -2971,7 +2971,7 @@ package body Sem_Ch6 is
Error_Msg_N
("function that returns abstract type must be abstract", N);
- -- Ada 2012 (AI-0073) : extend this test to subprograms with an
+ -- Ada 2012 (AI-0073): extend this test to subprograms with an
-- access result whose designated type is abstract.
elsif Nkind (Result_Definition (N)) = N_Access_Definition