From 6e32b1abbaaf5af6b96c055b432b7f6fea6dd814 Mon Sep 17 00:00:00 2001 From: Arnaud Charlet Date: Tue, 25 Feb 2014 15:57:28 +0100 Subject: [PATCH] [multiple changes] 2014-02-25 Yannick Moy * sem_prag.adb: Minor reformatting to get consistent messages. 2014-02-25 Robert Dewar * checks.adb: Minor reformatting. * sinfo.ads (Do_Range_Check): Document that this flag is never passed to the back end. From-SVN: r208129 --- gcc/ada/ChangeLog | 10 ++++++++++ gcc/ada/checks.adb | 11 +++++++---- gcc/ada/sem_prag.adb | 2 +- gcc/ada/sinfo.ads | 4 ++++ 4 files changed, 22 insertions(+), 5 deletions(-) diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index b7e4ae312c33..fe7927b23989 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,13 @@ +2014-02-25 Yannick Moy + + * sem_prag.adb: Minor reformatting to get consistent messages. + +2014-02-25 Robert Dewar + + * 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 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem_attr.adb, diff --git a/gcc/ada/checks.adb b/gcc/ada/checks.adb index 8feebb95fb23..ad4b5b7bb9a2 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 016cbf1a0d98..7b6b5fd8b9f2 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 9b1c270d0577..f9bf8a69094d 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 -- 2.47.2