aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2014-02-25 15:57:28 +0100
committerArnaud Charlet <charlet@gcc.gnu.org>2014-02-25 15:57:28 +0100
commit6e32b1abbaaf5af6b96c055b432b7f6fea6dd814 (patch)
tree93a340ae4dde445c445d73846e18ac5579125192
parentf9966234d510c33008281d0793d595f367f599b3 (diff)
downloadgcc-6e32b1abbaaf5af6b96c055b432b7f6fea6dd814.zip
gcc-6e32b1abbaaf5af6b96c055b432b7f6fea6dd814.tar.gz
gcc-6e32b1abbaaf5af6b96c055b432b7f6fea6dd814.tar.bz2
[multiple changes]
2014-02-25 Yannick Moy <moy@adacore.com> * sem_prag.adb: Minor reformatting to get consistent messages. 2014-02-25 Robert Dewar <dewar@adacore.com> * checks.adb: Minor reformatting. * sinfo.ads (Do_Range_Check): Document that this flag is never passed to the back end. From-SVN: r208129
-rw-r--r--gcc/ada/ChangeLog10
-rw-r--r--gcc/ada/checks.adb11
-rw-r--r--gcc/ada/sem_prag.adb2
-rw-r--r--gcc/ada/sinfo.ads4
4 files changed, 22 insertions, 5 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index b7e4ae3..fe7927b 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,5 +1,15 @@
2014-02-25 Yannick Moy <moy@adacore.com>
+ * sem_prag.adb: Minor reformatting to get consistent messages.
+
+2014-02-25 Robert Dewar <dewar@adacore.com>
+
+ * checks.adb: Minor reformatting.
+ * sinfo.ads (Do_Range_Check): Document that this flag is never
+ passed to the back end.
+
+2014-02-25 Yannick Moy <moy@adacore.com>
+
* sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem_attr.adb,
sem_ch6.adb: Remove useless references to SPARK RM in error messages.
diff --git a/gcc/ada/checks.adb b/gcc/ada/checks.adb
index 8feebb9..ad4b5b7 100644
--- a/gcc/ada/checks.adb
+++ b/gcc/ada/checks.adb
@@ -3064,14 +3064,15 @@ package body Checks is
Loc : constant Source_Ptr := Sloc (Ck_Node);
Checks_On : constant Boolean :=
not Index_Checks_Suppressed (Target_Typ)
- or else not Range_Checks_Suppressed (Target_Typ);
+ or else
+ not Range_Checks_Suppressed (Target_Typ);
Cond : Node_Id;
R_Cno : Node_Id;
R_Result : Check_Result;
begin
- if not Expander_Active or else not Checks_On then
+ if not Expander_Active or not Checks_On then
return;
end if;
@@ -3117,7 +3118,8 @@ package body Checks is
if Nkind (Ck_Node) = N_Range then
Apply_Compile_Time_Constraint_Error
- (Low_Bound (Ck_Node), "static range out of bounds of}??",
+ (Low_Bound (Ck_Node),
+ "static range out of bounds of}??",
CE_Range_Check_Failed,
Ent => Target_Typ,
Typ => Target_Typ);
@@ -3126,7 +3128,8 @@ package body Checks is
else
Apply_Compile_Time_Constraint_Error
- (Ck_Node, "static value out of range of}?",
+ (Ck_Node,
+ "static value out of range of}?",
CE_Range_Check_Failed,
Ent => Target_Typ,
Typ => Target_Typ);
diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb
index 016cbf1..7b6b5fd 100644
--- a/gcc/ada/sem_prag.adb
+++ b/gcc/ada/sem_prag.adb
@@ -958,7 +958,7 @@ package body Sem_Prag is
else
Error_Msg_N
- ("item must denote parameter, variable or state",
+ ("item must denote parameter, variable, or state",
Item);
end if;
end if;
diff --git a/gcc/ada/sinfo.ads b/gcc/ada/sinfo.ads
index 9b1c270..f9bf8a6 100644
--- a/gcc/ada/sinfo.ads
+++ b/gcc/ada/sinfo.ads
@@ -572,6 +572,10 @@ package Sinfo is
-- particular, these flags should also be correctly set in ASIS mode and
-- GNATprove mode.
+ -- Note: the expander always takes care of the Do_Range check case,
+ -- so this flag will never be set in the expanded tree passed to the
+ -- back end code generator.
+
-- Note that this accounts for all nodes that trigger the corresponding
-- checks, except for range checks on subtype_indications, which may be
-- required to check that a range_constraint is compatible with the given