aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/sem_util.ads
diff options
context:
space:
mode:
authorBob Duff <duff@adacore.com>2022-12-06 11:37:27 -0500
committerMarc Poulhiès <poulhies@adacore.com>2023-01-03 10:29:52 +0100
commit7512dcc94236d247ceef8cef6d36392a86e271a0 (patch)
tree7c7bd8fdd70250907dc78c7bf8b24eb24aa188be /gcc/ada/sem_util.ads
parent930b81af5b0207585819ea9988a0f50d009940a7 (diff)
downloadgcc-7512dcc94236d247ceef8cef6d36392a86e271a0.zip
gcc-7512dcc94236d247ceef8cef6d36392a86e271a0.tar.gz
gcc-7512dcc94236d247ceef8cef6d36392a86e271a0.tar.bz2
ada: Simplify [Small_]Integer_Type_For
Make Small_Integer_Type_For call Integer_Type_For, so they share most of the code. Remove Standard_Long_Integer from consideration, because that's different on different machines (32- or 64-bit). Standard_Integer or Standard_Long_Long_Integer will be chosen. gcc/ada/ * exp_util.adb (Integer_Type_For): Assertion and comment. (Small_Integer_Type_For): Remove some code and call Integer_Type_For instead. * sem_util.ads (Rep_To_Pos_Flag): Improve comments. "Standard_..." seems overly pedantic here. * exp_attr.adb (Succ, Pred): Clean up: make the code as similar as possible. * exp_ch4.adb: Minor: named notation.
Diffstat (limited to 'gcc/ada/sem_util.ads')
-rw-r--r--gcc/ada/sem_util.ads18
1 files changed, 9 insertions, 9 deletions
diff --git a/gcc/ada/sem_util.ads b/gcc/ada/sem_util.ads
index b647e68..b61695e 100644
--- a/gcc/ada/sem_util.ads
+++ b/gcc/ada/sem_util.ads
@@ -2976,16 +2976,16 @@ package Sem_Util is
function Rep_To_Pos_Flag (E : Entity_Id; Loc : Source_Ptr) return Node_Id;
-- This is used to construct the second argument in a call to Rep_To_Pos
- -- which is Standard_True if range checks are enabled (E is an entity to
- -- which the Range_Checks_Suppressed test is applied), and Standard_False
- -- if range checks are suppressed. Loc is the location for the node that
- -- is returned (which is a New_Occurrence of the appropriate entity).
+ -- which is True if range checks are enabled (E is an entity to which the
+ -- Range_Checks_Suppressed test is applied), and False if range checks are
+ -- suppressed. Loc is the location for the node that is returned (which is
+ -- a New_Occurrence of the appropriate entity).
--
- -- Note: one might think that it would be fine to always use True and
- -- to ignore the suppress in this case, but it is generally better to
- -- believe a request to suppress exceptions if possible, and further
- -- more there is at least one case in the generated code (the code for
- -- array assignment in a loop) that depends on this suppression.
+ -- Note: one might think that it would be fine to always use True and to
+ -- ignore the suppress in this case, but there is at least one case in the
+ -- generated code (the code for array assignment in a loop) that depends on
+ -- this suppression. Anyway, it is generally better to believe a request to
+ -- suppress exceptions if possible.
procedure Require_Entity (N : Node_Id);
-- N is a node which should have an entity value if it is an entity name.