]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[Ada] Fix comments mentioning ancient flags related to objects references
authorPiotr Trojanek <trojanek@adacore.com>
Mon, 6 Jun 2022 11:02:28 +0000 (13:02 +0200)
committerPierre-Marie de Rodat <derodat@adacore.com>
Tue, 5 Jul 2022 08:28:18 +0000 (08:28 +0000)
Flag May_Be_Modified under go a series of renamings between 1996 and
2002.  It was changed to Not_Assigned, then to Not_Source_Assigned and
finally to Never_Set_In_Source. Fix remaining references in comments.

gcc/ada/

* sem_util.ads (Note_Possible_Modification): Fix occurrence of
May_Be_Modified in comment.
* sem_warn.ads (Check_Unset_Reference): Fix occurrence of
Not_Assigned in comment.

gcc/ada/sem_util.ads
gcc/ada/sem_warn.ads

index 4121cf0457a737d1e4f261ce542dcf180af5dc58..de7883c2a388f4ec596189f8f27b9a459af991dd 100644 (file)
@@ -2872,7 +2872,7 @@ package Sem_Util is
    --  This routine is called if the sub-expression N maybe the target of
    --  an assignment (e.g. it is the left side of an assignment, used as
    --  an out parameters, or used as prefixes of access attributes). It
-   --  sets May_Be_Modified in the associated entity if there is one,
+   --  sets Never_Set_In_Source in the associated entity if there is one,
    --  taking into account the rule that in the case of renamed objects,
    --  it is the flag in the renamed object that must be set.
    --
index bcf74aba33cd6863103a50132a4c888833c0b78a..1894f36f4b0c6052f2decaf028c379ff91b4c9e7 100644 (file)
@@ -86,15 +86,15 @@ package Sem_Warn is
    --  N is the node for an expression which occurs in a reference position,
    --  e.g. as the right side of an assignment. This procedure checks to see
    --  if the node is a reference to a variable entity where the entity has
-   --  Not_Assigned set. If so, the Unset_Reference field is set if it is not
-   --  the first occurrence. No warning is posted, instead warnings will be
-   --  posted later by Check_References. The reason we do things that
-   --  way is that if there are no assignments anywhere, we prefer to flag
-   --  the entity, rather than a reference to it. Note that for the purposes
-   --  of this routine, a type conversion or qualified expression whose
-   --  expression is an entity is also processed. The reason that we do not
-   --  process these at the point of occurrence is that both these constructs
-   --  can occur in non-reference positions (e.g. as out parameters).
+   --  Never_Set_In_Source set. If so, the Unset_Reference field is set if it
+   --  is not the first occurrence. No warning is posted, instead warnings will
+   --  be posted later by Check_References. The reason we do things that way is
+   --  that if there are no assignments anywhere, we prefer to flag the entity,
+   --  rather than a reference to it. Note that for the purposes of this
+   --  routine, a type conversion or qualified expression whose expression is
+   --  an entity is also processed. The reason that we do not process these
+   --  at the point of occurrence is that both these constructs can occur in
+   --  non-reference positions (e.g. as out parameters).
 
    procedure Check_Unused_Withs (Spec_Unit : Unit_Number_Type := No_Unit);
    --  This routine performs two kinds of checks. It checks that all with'ed