summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2015-01-06 09:03:37 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2015-01-06 09:03:37 +0000
commit3e72ade3e8e7e1f51ad7217312faa5741af84d29 (patch)
treebb17b9b5c44242ba3f40e2cfd7ef7d90255a91fe
parentc40ceeb4c17fc8813206604a7206ed49483b13e9 (diff)
downloadgcc-3e72ade3e8e7e1f51ad7217312faa5741af84d29.tar.gz
2015-01-06 Vincent Celier <celier@adacore.com>
* prj-env.adb: Minor comment update. 2015-01-06 Javier Miranda <miranda@adacore.com> * sem_res.adb (Valid_Conversion): Restrict the checks on anonymous access types whose target type is an interface type to operands that are access types; required to report an error when the operand is not an access type. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@219226 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ada/ChangeLog12
-rw-r--r--gcc/ada/prj-env.adb2
-rw-r--r--gcc/ada/sem_res.adb28
3 files changed, 28 insertions, 14 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index b0b4b967eef..a8f36b90dec 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,14 @@
+2015-01-06 Vincent Celier <celier@adacore.com>
+
+ * prj-env.adb: Minor comment update.
+
+2015-01-06 Javier Miranda <miranda@adacore.com>
+
+ * sem_res.adb (Valid_Conversion): Restrict the checks on anonymous
+ access types whose target type is an interface type to operands
+ that are access types; required to report an error when the
+ operand is not an access type.
+
2015-01-06 Bob Duff <duff@adacore.com>
* a-cfinve.adb (Copy): Set the discriminant to the Length when
@@ -12,6 +23,7 @@
2015-01-06 Ed Schonberg <schonberg@adacore.com>
* sem_ch12.adb: Code clean up.
+
2015-01-06 Arnaud Charlet <charlet@adacore.com>
* gnatvsn.ads: Bump copyright year.
diff --git a/gcc/ada/prj-env.adb b/gcc/ada/prj-env.adb
index 7b76ae04e38..92019fcda9c 100644
--- a/gcc/ada/prj-env.adb
+++ b/gcc/ada/prj-env.adb
@@ -1899,7 +1899,7 @@ package body Prj.Env is
Runtime : String_Ptr;
procedure Add_Target;
- -- Comment ALWAYS required for nested subprogram spec ???
+ -- Add :<prefix>/<target> to the project path
----------------
-- Add_Target --
diff --git a/gcc/ada/sem_res.adb b/gcc/ada/sem_res.adb
index df88d43d069..7b30bd3711a 100644
--- a/gcc/ada/sem_res.adb
+++ b/gcc/ada/sem_res.adb
@@ -99,10 +99,10 @@ package body Sem_Res is
-- a component of a discriminated type (record or concurrent type).
procedure Check_For_Visible_Operator (N : Node_Id; T : Entity_Id);
- -- Given a node for an operator associated with type T, check that
- -- the operator is visible. Operators all of whose operands are
- -- universal must be checked for visibility during resolution
- -- because their type is not determinable based on their operands.
+ -- Given a node for an operator associated with type T, check that the
+ -- operator is visible. Operators all of whose operands are universal must
+ -- be checked for visibility during resolution because their type is not
+ -- determinable based on their operands.
procedure Check_Fully_Declared_Prefix
(Typ : Entity_Id;
@@ -258,8 +258,8 @@ package body Sem_Res is
procedure Set_String_Literal_Subtype (N : Node_Id; Typ : Entity_Id);
-- The String_Literal_Subtype is built for all strings that are not
- -- operands of a static concatenation operation. If the argument is
- -- not a N_String_Literal node, then the call has no effect.
+ -- operands of a static concatenation operation. If the argument is not
+ -- a N_String_Literal node, then the call has no effect.
procedure Set_Slice_Subtype (N : Node_Id);
-- Build subtype of array type, with the range specified by the slice
@@ -429,11 +429,12 @@ package body Sem_Res is
elsif Nkind (P) = N_Index_Or_Discriminant_Constraint then
-- The following check catches the unusual case where a
- -- discriminant appears within an index constraint that is part of
- -- a larger expression within a constraint on a component, e.g. "C
- -- : Int range 1 .. F (new A(1 .. D))". For now we only check case
- -- of record components, and note that a similar check should also
- -- apply in the case of discriminant constraints below. ???
+ -- discriminant appears within an index constraint that is part
+ -- of a larger expression within a constraint on a component,
+ -- e.g. "C : Int range 1 .. F (new A(1 .. D))". For now we only
+ -- check case of record components, and note that a similar check
+ -- should also apply in the case of discriminant constraints
+ -- below. ???
-- Note that the check for N_Subtype_Declaration below is to
-- detect the valid use of discriminants in the constraints of a
@@ -12093,8 +12094,9 @@ package body Sem_Res is
-- Ada 2005 (AI-251): Anonymous access types where target references an
-- interface type.
- elsif Ekind_In (Target_Type, E_General_Access_Type,
- E_Anonymous_Access_Type)
+ elsif Is_Access_Type (Opnd_Type)
+ and then Ekind_In (Target_Type, E_General_Access_Type,
+ E_Anonymous_Access_Type)
and then Is_Interface (Directly_Designated_Type (Target_Type))
then
-- Check the static accessibility rule of 4.6(17). Note that the