]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[multiple changes]
authorArnaud Charlet <charlet@gcc.gnu.org>
Tue, 25 Feb 2014 14:57:28 +0000 (15:57 +0100)
committerArnaud Charlet <charlet@gcc.gnu.org>
Tue, 25 Feb 2014 14:57:28 +0000 (15:57 +0100)
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

gcc/ada/ChangeLog
gcc/ada/checks.adb
gcc/ada/sem_prag.adb
gcc/ada/sinfo.ads

index b7e4ae312c33f23b72a20ae748074b3c5ea34114..fe7927b239891383fda93f5b485e79116d8b91ef 100644 (file)
@@ -1,3 +1,13 @@
+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,
index 8feebb95fb231d85472b28400c94d6456d61b2d7..ad4b5b7bb9a2dcc59cc0d4b7a04a532d5ecc0902 100644 (file)
@@ -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);
index 016cbf1a0d98fdca11a0a9cfe8aaacf7cc85de3e..7b6b5fd8b9f29d0d3dedb254e120c8965b7bfe2a 100644 (file)
@@ -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;
index 9b1c270d0577ee508e6307ba3f9b4d29c0ff52b2..f9bf8a69094d901fec0e455bf2975e9f16d0dd90 100644 (file)
@@ -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