Small tweak to comments in range_cannot_be_superflat
authorEric Botcazou <ebotcazou@adacore.com>
Wed, 22 Sep 2021 10:18:48 +0000 (12:18 +0200)
committerEric Botcazou <ebotcazou@adacore.com>
Wed, 22 Sep 2021 10:20:05 +0000 (12:20 +0200)
gcc/ada/
* gcc-interface/decl.c (range_cannot_be_superflat): Tweak comments.

gcc/ada/gcc-interface/decl.c

index 884d1d8..32142d0 100644 (file)
@@ -6503,7 +6503,8 @@ range_cannot_be_superflat (Node_Id gnat_range)
   Node_Id gnat_scalar_range;
   tree gnu_lb, gnu_hb, gnu_lb_minus_one;
 
-  /* If the low bound is not constant, try to find an upper bound.  */
+  /* If the low bound is not constant, take the worst case by finding an upper
+     bound for its type, repeatedly if need be.  */
   while (Nkind (gnat_lb) != N_Integer_Literal
         && (Ekind (Etype (gnat_lb)) == E_Signed_Integer_Subtype
             || Ekind (Etype (gnat_lb)) == E_Modular_Integer_Subtype)
@@ -6512,7 +6513,8 @@ range_cannot_be_superflat (Node_Id gnat_range)
             || Nkind (gnat_scalar_range) == N_Range))
     gnat_lb = High_Bound (gnat_scalar_range);
 
-  /* If the high bound is not constant, try to find a lower bound.  */
+  /* If the high bound is not constant, take the worst case by finding a lower
+     bound for its type, repeatedly if need be.  */
   while (Nkind (gnat_hb) != N_Integer_Literal
         && (Ekind (Etype (gnat_hb)) == E_Signed_Integer_Subtype
             || Ekind (Etype (gnat_hb)) == E_Modular_Integer_Subtype)