aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2014-08-04 12:11:51 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2014-08-04 12:11:51 +0200
commit11261647740b1ae87c271c47c5849f62628f6a91 (patch)
treefe2326e347a26df09cbc2a1f1badc70c6da1bd27 /gcc
parent1e3689bd20d682d6f10373abccea6445d901c499 (diff)
downloadgcc-11261647740b1ae87c271c47c5849f62628f6a91.zip
gcc-11261647740b1ae87c271c47c5849f62628f6a91.tar.gz
gcc-11261647740b1ae87c271c47c5849f62628f6a91.tar.bz2
[multiple changes]
2014-08-04 Robert Dewar <dewar@adacore.com> * exp_ch5.adb, sem_ch5.adb, einfo.ads: Minor reformatting. 2014-08-04 Arnaud Charlet <charlet@adacore.com> * sem_ch4.adb (Operator_Check): Refine previous change. From-SVN: r213561
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ada/ChangeLog8
-rw-r--r--gcc/ada/einfo.ads6
-rw-r--r--gcc/ada/exp_ch5.adb6
-rw-r--r--gcc/ada/sem_ch4.adb16
-rw-r--r--gcc/ada/sem_ch5.adb4
5 files changed, 24 insertions, 16 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 441e2a0..5684a66 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,11 @@
+2014-08-04 Robert Dewar <dewar@adacore.com>
+
+ * exp_ch5.adb, sem_ch5.adb, einfo.ads: Minor reformatting.
+
+2014-08-04 Arnaud Charlet <charlet@adacore.com>
+
+ * sem_ch4.adb (Operator_Check): Refine previous change.
+
2014-08-04 Arnaud Charlet <charlet@adacore.com>
* sem_scil.ads: Improve comments.
diff --git a/gcc/ada/einfo.ads b/gcc/ada/einfo.ads
index 7dd8257..23516be 100644
--- a/gcc/ada/einfo.ads
+++ b/gcc/ada/einfo.ads
@@ -2844,9 +2844,9 @@ package Einfo is
-- as well as for record with private types as subtypes
-- Is_Processed_Transient (Flag252)
--- Defined in entities of variables and constants, including the loop
--- parameters of generalized iterators. Set when a transient object needs
--- to be finalized and it has already been processed by the transient
+-- Defined in variables, loop parameters, and constants, including the
+-- loop parameters of generalized iterators. Set when a transient object
+-- needs to be finalized and has already been processed by the transient
-- scope machinery. This flag signals the general finalization mechanism
-- to ignore the transient object.
diff --git a/gcc/ada/exp_ch5.adb b/gcc/ada/exp_ch5.adb
index 3632795..12c50a1 100644
--- a/gcc/ada/exp_ch5.adb
+++ b/gcc/ada/exp_ch5.adb
@@ -3198,8 +3198,8 @@ package body Exp_Ch5 is
Id : constant Entity_Id := Defining_Identifier (I_Spec);
Loc : constant Source_Ptr := Sloc (N);
- Container : constant Node_Id := Name (I_Spec);
- Container_Typ : constant Entity_Id := Base_Type (Etype (Container));
+ Container : constant Node_Id := Name (I_Spec);
+ Container_Typ : constant Entity_Id := Base_Type (Etype (Container));
I_Kind : constant Entity_Kind := Ekind (Id);
Cursor : Entity_Id;
Iterator : Entity_Id;
@@ -3594,7 +3594,7 @@ package body Exp_Ch5 is
-- The cursor is only modified in expanded code, so it appears
-- as unassigned to the warning machinery. We must suppress
-- this spurious warning explicitly. The cursor's kind is that of
- -- the original loop parameter (it is a constant if the doamin of
+ -- the original loop parameter (it is a constant if the domain of
-- iteration is constant).
Set_Warnings_Off (Cursor);
diff --git a/gcc/ada/sem_ch4.adb b/gcc/ada/sem_ch4.adb
index c675f05..6c26031 100644
--- a/gcc/ada/sem_ch4.adb
+++ b/gcc/ada/sem_ch4.adb
@@ -6446,14 +6446,6 @@ package body Sem_Ch4 is
return;
end if;
- elsif Nkind_In (N, N_Op_Eq, N_Op_Ne) then
- if Address_Integer_Convert_OK (Etype (R), Etype (L)) then
- Rewrite (R,
- Unchecked_Convert_To (Etype (L), Relocate_Node (R)));
- Analyze_Equality_Op (N);
- return;
- end if;
-
-- For an arithmetic operator or comparison operator, if one
-- of the operands is numeric, then we know the other operand
-- is not the same numeric type. If it is a non-numeric type,
@@ -6608,6 +6600,14 @@ package body Sem_Ch4 is
end if;
return;
+
+ elsif Nkind_In (N, N_Op_Eq, N_Op_Ne) then
+ if Address_Integer_Convert_OK (Etype (R), Etype (L)) then
+ Rewrite (R,
+ Unchecked_Convert_To (Etype (L), Relocate_Node (R)));
+ Analyze_Equality_Op (N);
+ return;
+ end if;
end if;
-- If we fall through then just give general message. Note that in
diff --git a/gcc/ada/sem_ch5.adb b/gcc/ada/sem_ch5.adb
index 8552a7ca..4ece78b 100644
--- a/gcc/ada/sem_ch5.adb
+++ b/gcc/ada/sem_ch5.adb
@@ -3114,8 +3114,8 @@ package body Sem_Ch5 is
-- If the expander is not active, or in SPARK mode, then we want to
-- analyze the loop body now even in the Ada 2012 iterator case, since
-- the rewriting will not be done. Insert the loop variable in the
- -- current scope, if not done when analysing the iteration scheme. Set
- -- is kind properly to detect improper uses in the loop body.
+ -- current scope, if not done when analysing the iteration scheme.
+ -- Set its kind properly to detect improper uses in the loop body.
if Present (Iter)
and then Present (Iterator_Specification (Iter))