]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[Ada] Avoid namespace pollution for Next and Previous
authorBob Duff <duff@adacore.com>
Tue, 21 Jun 2022 18:32:37 +0000 (14:32 -0400)
committerPierre-Marie de Rodat <derodat@adacore.com>
Tue, 12 Jul 2022 12:24:11 +0000 (12:24 +0000)
This patch renames Next and Previous in a-convec.ads and other
containers to be _Next and _Previous, to avoid namespace pollution.  The
compiler now uses the leading-underscore names to look them up.

The scanner is changed to allow this.

gcc/ada/

* exp_ch5.adb (Expand_Iterator_Loop_Over_Array): Use _Next and
_Previous in the optimized expansion of "for ... of".  No longer
need to check parameter profiles for these, because the
leading-underscore names are unique.
* libgnat/a-convec.ads (_Next, _Previous): Renamings of Next and
Previous, to avoid namespace pollution.
* libgnat/a-cbdlli.ads, libgnat/a-cbhama.ads,
libgnat/a-cbhase.ads, libgnat/a-cbmutr.ads,
libgnat/a-cborma.ads, libgnat/a-cborse.ads,
libgnat/a-cdlili.ads, libgnat/a-cidlli.ads,
libgnat/a-cihama.ads, libgnat/a-cihase.ads,
libgnat/a-cimutr.ads, libgnat/a-ciorma.ads,
libgnat/a-ciorse.ads, libgnat/a-cobove.ads,
libgnat/a-cohama.ads, libgnat/a-cohase.ads,
libgnat/a-coinve.ads, libgnat/a-comutr.ads,
libgnat/a-coorma.ads, libgnat/a-coorse.ads: Likewise.  Also,
remove duplicated comments -- refer to one comment about _Next,
_Previous, Pseudo_Reference in libgnat/a-convec.ads. DRY.
* scng.adb (Scan): Allow leading underscores in identifiers in
the run-time library.
* snames.ads-tmpl (Name_uNext, Name_uPrevious): New names with
leading underscores.

24 files changed:
gcc/ada/exp_ch5.adb
gcc/ada/libgnat/a-cbdlli.ads
gcc/ada/libgnat/a-cbhama.ads
gcc/ada/libgnat/a-cbhase.ads
gcc/ada/libgnat/a-cbmutr.ads
gcc/ada/libgnat/a-cborma.ads
gcc/ada/libgnat/a-cborse.ads
gcc/ada/libgnat/a-cdlili.ads
gcc/ada/libgnat/a-cidlli.ads
gcc/ada/libgnat/a-cihama.ads
gcc/ada/libgnat/a-cihase.ads
gcc/ada/libgnat/a-cimutr.ads
gcc/ada/libgnat/a-ciorma.ads
gcc/ada/libgnat/a-ciorse.ads
gcc/ada/libgnat/a-cobove.ads
gcc/ada/libgnat/a-cohama.ads
gcc/ada/libgnat/a-cohase.ads
gcc/ada/libgnat/a-coinve.ads
gcc/ada/libgnat/a-comutr.ads
gcc/ada/libgnat/a-convec.ads
gcc/ada/libgnat/a-coorma.ads
gcc/ada/libgnat/a-coorse.ads
gcc/ada/scng.adb
gcc/ada/snames.ads-tmpl

index 2072935d2ca61a9b3d228ccad3135cd72bee1d25..9a2a1101de9cbefe48cc030a63ed040889a4c6d2 100644 (file)
@@ -4924,7 +4924,8 @@ package body Exp_Ch5 is
 
    --  In the optimized case, we make use of these:
 
-   --     procedure Next (Position : in out Cursor); -- instead of Iter.Next
+   --     procedure _Next (Position : in out Cursor); -- instead of Iter.Next
+   --        (or _Previous for reverse loops)
 
    --     function Pseudo_Reference
    --       (Container : aliased Vector'Class) return Reference_Control_Type;
@@ -4939,6 +4940,11 @@ package body Exp_Ch5 is
    --  pollute the namespace for clients. The compiler has no trouble breaking
    --  privacy to call things in the private part of an instance.)
 
+   --  Note that Next and Previous are renamed as _Next and _Previous with
+   --  leading underscores. Leading underscores are illegal in Ada, but we
+   --  allow them in the run-time library. This allows us to avoid polluting
+   --  the user-visible namespaces.
+
    --  Source:
 
    --      for X of My_Vector loop
@@ -4989,7 +4995,7 @@ package body Exp_Ch5 is
    --              X.Count := X.Count + 1;
    --              ...
    --
-   --              Next (Cur); -- or Prev
+   --              _Next (Cur); -- or _Previous
    --              --  This is instead of "Cur := Next (Iter, Cur);"
    --          end;
    --          --  No finalization here
@@ -5015,13 +5021,14 @@ package body Exp_Ch5 is
       Stats    : List_Id     := Statements (N);
       --  Maybe wrapped in a conditional if a filter is present
 
-      Cursor    : Entity_Id;
-      Decl      : Node_Id;
-      Iter_Type : Entity_Id;
-      Iterator  : Entity_Id;
-      Name_Init : Name_Id;
-      Name_Step : Name_Id;
-      New_Loop  : Node_Id;
+      Cursor         : Entity_Id;
+      Decl           : Node_Id;
+      Iter_Type      : Entity_Id;
+      Iterator       : Entity_Id;
+      Name_Init      : Name_Id;
+      Name_Step      : Name_Id;
+      Name_Fast_Step : Name_Id;
+      New_Loop       : Node_Id;
 
       Fast_Element_Access_Op : Entity_Id := Empty;
       Fast_Step_Op           : Entity_Id := Empty;
@@ -5049,9 +5056,11 @@ package body Exp_Ch5 is
       if Reverse_Present (I_Spec) then
          Name_Init := Name_Last;
          Name_Step := Name_Previous;
+         Name_Fast_Step := Name_uPrevious;
       else
          Name_Init := Name_First;
          Name_Step := Name_Next;
+         Name_Fast_Step := Name_uNext;
       end if;
 
       --  The type of the iterator is the return type of the Iterate function
@@ -5189,14 +5198,13 @@ package body Exp_Ch5 is
 
             Iter_Pack := Scope (Root_Type (Etype (Iter_Type)));
 
-            --  Find declarations needed for "for ... of" optimization
+            --  Find declarations needed for "for ... of" optimization.
             --  These declarations come from GNAT sources or sources
             --  derived from them. User code may include additional
             --  overloadings with similar names, and we need to perforn
             --  some reasonable resolution to find the needed primitives.
-            --  It is unclear whether this mechanism is fragile if a user
-            --  makes arbitrary changes to the private part of a package
-            --  that supports iterators.
+            --  Note that we use _Next or _Previous to avoid picking up
+            --  some arbitrary user-defined Next or Previous.
 
             Ent := First_Entity (Pack);
             while Present (Ent) loop
@@ -5215,12 +5223,7 @@ package body Exp_Ch5 is
                --  Next or Prev procedure with one parameter called
                --  Position.
 
-               elsif Chars (Ent) = Name_Step
-                 and then Ekind (Ent) = E_Procedure
-                 and then Present (First_Formal (Ent))
-                 and then Chars (First_Formal (Ent)) = Name_Position
-                 and then No (Next_Formal (First_Formal (Ent)))
-               then
+               elsif Chars (Ent) = Name_Fast_Step then
                   pragma Assert (No (Fast_Step_Op));
                   Fast_Step_Op := Ent;
 
index 10be7abd28c0b5136de99296f3c6665b5b54fbc2..78343a04ef4cfeafa89d33f51f63b9fafdfda359 100644 (file)
@@ -364,10 +364,10 @@ private
 
    for Reference_Type'Read use Read;
 
-   --  Three operations are used to optimize in the expansion of "for ... of"
-   --  loops: the Next(Cursor) procedure in the visible part, and the following
-   --  Pseudo_Reference and Get_Element_Access functions. See Exp_Ch5 for
-   --  details.
+   --  See Ada.Containers.Vectors for documentation on the following
+
+   procedure _Next (Position : in out Cursor) renames Next;
+   procedure _Previous (Position : in out Cursor) renames Previous;
 
    function Pseudo_Reference
      (Container : aliased List'Class) return Reference_Control_Type;
index 6891a2fa9d43df5a6183d9cb08374eafba440fbc..c62d4519d679a07976c0e6ae1773c1890c178aa5 100644 (file)
@@ -439,10 +439,9 @@ private
 
    for Reference_Type'Read use Read;
 
-   --  Three operations are used to optimize in the expansion of "for ... of"
-   --  loops: the Next(Cursor) procedure in the visible part, and the following
-   --  Pseudo_Reference and Get_Element_Access functions. See Sem_Ch5 for
-   --  details.
+   --  See Ada.Containers.Vectors for documentation on the following
+
+   procedure _Next (Position : in out Cursor) renames Next;
 
    function Pseudo_Reference
      (Container : aliased Map'Class) return Reference_Control_Type;
index 351014d302f0aab96010b95839b218e1dd33568b..7c6d971b27a8331e7b025a635df0fd6009c6c2b7 100644 (file)
@@ -596,10 +596,9 @@ private
 
    for Constant_Reference_Type'Write use Write;
 
-   --  Three operations are used to optimize in the expansion of "for ... of"
-   --  loops: the Next(Cursor) procedure in the visible part, and the following
-   --  Pseudo_Reference and Get_Element_Access functions. See Sem_Ch5 for
-   --  details.
+   --  See Ada.Containers.Vectors for documentation on the following
+
+   procedure _Next (Position : in out Cursor) renames Next;
 
    function Pseudo_Reference
      (Container : aliased Set'Class) return Reference_Control_Type;
index 2448eacccab5d896254de333edcc24250cdbcb26..89d5cdff68809c9e0d2fa54fba509d6c29d0e94b 100644 (file)
@@ -386,10 +386,7 @@ private
       Item   : out Reference_Type);
    for Reference_Type'Read use Read;
 
-   --  Three operations are used to optimize in the expansion of "for ... of"
-   --  loops: the Next(Cursor) procedure in the visible part, and the following
-   --  Pseudo_Reference and Get_Element_Access functions. See Exp_Ch5 for
-   --  details.
+   --  See Ada.Containers.Vectors for documentation on the following
 
    function Pseudo_Reference
      (Container : aliased Tree'Class) return Reference_Control_Type;
index 5b0ed730cc3ce658477bd47cf0a66b39deddf505..af69febb8289e2c324d23b9ad3ef9ac0b0d8b38d 100644 (file)
@@ -341,10 +341,10 @@ private
 
    for Reference_Type'Write use Write;
 
-   --  Three operations are used to optimize in the expansion of "for ... of"
-   --  loops: the Next(Cursor) procedure in the visible part, and the following
-   --  Pseudo_Reference and Get_Element_Access functions.  See Sem_Ch5 for
-   --  details.
+   --  See Ada.Containers.Vectors for documentation on the following
+
+   procedure _Next (Position : in out Cursor) renames Next;
+   procedure _Previous (Position : in out Cursor) renames Previous;
 
    function Pseudo_Reference
      (Container : aliased Map'Class) return Reference_Control_Type;
index 53acf355a620c390e139a3678b381149b3d22c71..0b7e86f982ef331aca79ccbe202635f0d312c98e 100644 (file)
@@ -435,10 +435,10 @@ private
 
    for Constant_Reference_Type'Write use Write;
 
-   --  Three operations are used to optimize in the expansion of "for ... of"
-   --  loops: the Next(Cursor) procedure in the visible part, and the following
-   --  Pseudo_Reference and Get_Element_Access functions. See Sem_Ch5 for
-   --  details.
+   --  See Ada.Containers.Vectors for documentation on the following
+
+   procedure _Next (Position : in out Cursor) renames Next;
+   procedure _Previous (Position : in out Cursor) renames Previous;
 
    function Pseudo_Reference
      (Container : aliased Set'Class) return Reference_Control_Type;
index abfd011bdac6d1aa42f996307b722651f0f4f72b..bfe10ee50f3834d60962abae462c74f9583b0aa1 100644 (file)
@@ -374,10 +374,10 @@ private
 
    for Reference_Type'Read use Read;
 
-   --  Three operations are used to optimize in the expansion of "for ... of"
-   --  loops: the Next(Cursor) procedure in the visible part, and the following
-   --  Pseudo_Reference and Get_Element_Access functions. See Sem_Ch5 for
-   --  details.
+   --  See Ada.Containers.Vectors for documentation on the following
+
+   procedure _Next (Position : in out Cursor) renames Next;
+   procedure _Previous (Position : in out Cursor) renames Previous;
 
    function Pseudo_Reference
      (Container : aliased List'Class) return Reference_Control_Type;
index 35ca010f6a12af8c841cbee2d8ee9810b795730b..cc0c70ca703deac6b69ca3902a8a69d66428e760 100644 (file)
@@ -368,10 +368,10 @@ private
 
    for Reference_Type'Read use Read;
 
-   --  Three operations are used to optimize in the expansion of "for ... of"
-   --  loops: the Next(Cursor) procedure in the visible part, and the following
-   --  Pseudo_Reference and Get_Element_Access functions. See Exp_Ch5 for
-   --  details.
+   --  See Ada.Containers.Vectors for documentation on the following
+
+   procedure _Next (Position : in out Cursor) renames Next;
+   procedure _Previous (Position : in out Cursor) renames Previous;
 
    function Pseudo_Reference
      (Container : aliased List'Class) return Reference_Control_Type;
index 8a5f180498919709d05c4d2f15683cdf6907a3d0..142c94e51251cb81f7f24be493a46f9444c40d24 100644 (file)
@@ -440,10 +440,9 @@ private
 
    for Reference_Type'Read use Read;
 
-   --  Three operations are used to optimize in the expansion of "for ... of"
-   --  loops: the Next(Cursor) procedure in the visible part, and the following
-   --  Pseudo_Reference and Get_Element_Access functions. See Sem_Ch5 for
-   --  details.
+   --  See Ada.Containers.Vectors for documentation on the following
+
+   procedure _Next (Position : in out Cursor) renames Next;
 
    function Pseudo_Reference
      (Container : aliased Map'Class) return Reference_Control_Type;
index 2bb452729fd3713ada27dcf53fd17fa990887232..f0b0f1551f46df7a21f78b8e95f32f9c90b9a978 100644 (file)
@@ -589,10 +589,9 @@ private
 
    for Constant_Reference_Type'Write use Write;
 
-   --  Three operations are used to optimize in the expansion of "for ... of"
-   --  loops: the Next(Cursor) procedure in the visible part, and the following
-   --  Pseudo_Reference and Get_Element_Access functions. See Sem_Ch5 for
-   --  details.
+   --  See Ada.Containers.Vectors for documentation on the following
+
+   procedure _Next (Position : in out Cursor) renames Next;
 
    function Pseudo_Reference
      (Container : aliased Set'Class) return Reference_Control_Type;
index 2bb12086a05c50c5ec514630fc5c4f534f3bbd17..8a39a5b873f2d7c5b2078f78a5a3b098190deefd 100644 (file)
@@ -439,10 +439,7 @@ private
 
    for Reference_Type'Write use Write;
 
-   --  Three operations are used to optimize in the expansion of "for ... of"
-   --  loops: the Next(Cursor) procedure in the visible part, and the following
-   --  Pseudo_Reference and Get_Element_Access functions. See Exp_Ch5 for
-   --  details.
+   --  See Ada.Containers.Vectors for documentation on the following
 
    function Pseudo_Reference
      (Container : aliased Tree'Class) return Reference_Control_Type;
index e4fd90da5ff76aa6ddb1526cf95e106fdb8f1ba5..c240dcca81ce72dab932507567eab26ba54075fd 100644 (file)
@@ -355,10 +355,10 @@ private
 
    for Reference_Type'Write use Write;
 
-   --  Three operations are used to optimize in the expansion of "for ... of"
-   --  loops: the Next(Cursor) procedure in the visible part, and the following
-   --  Pseudo_Reference and Get_Element_Access functions.  See Sem_Ch5 for
-   --  details.
+   --  See Ada.Containers.Vectors for documentation on the following
+
+   procedure _Next (Position : in out Cursor) renames Next;
+   procedure _Previous (Position : in out Cursor) renames Previous;
 
    function Pseudo_Reference
      (Container : aliased Map'Class) return Reference_Control_Type;
index 51545d62e992d7ae824760d052e06774e0fb4661..e40ebfa3267849c1fd11cd70c299eec8d652210b 100644 (file)
@@ -454,10 +454,10 @@ private
 
    for Constant_Reference_Type'Write use Write;
 
-   --  Three operations are used to optimize in the expansion of "for ... of"
-   --  loops: the Next(Cursor) procedure in the visible part, and the following
-   --  Pseudo_Reference and Get_Element_Access functions. See Sem_Ch5 for
-   --  details.
+   --  See Ada.Containers.Vectors for documentation on the following
+
+   procedure _Next (Position : in out Cursor) renames Next;
+   procedure _Previous (Position : in out Cursor) renames Previous;
 
    function Pseudo_Reference
      (Container : aliased Set'Class) return Reference_Control_Type;
index 8e0f80f12ea563ec933814f0141de41ed87b51ca..6f4b1180156099792fab58e76a9fef4e7cf1628b 100644 (file)
@@ -511,10 +511,10 @@ private
 
    for Reference_Type'Write use Write;
 
-   --  Three operations are used to optimize in the expansion of "for ... of"
-   --  loops: the Next(Cursor) procedure in the visible part, and the following
-   --  Pseudo_Reference and Get_Element_Access functions. See Exp_Ch5 for
-   --  details.
+   --  See Ada.Containers.Vectors for documentation on the following
+
+   procedure _Next (Position : in out Cursor) renames Next;
+   procedure _Previous (Position : in out Cursor) renames Previous;
 
    function Pseudo_Reference
      (Container : aliased Vector'Class) return Reference_Control_Type;
index 96ac16414701a82ae8f002f00a483e720b32b432..65949dcc9614289b48a71094f05f552bb19ca0fa 100644 (file)
@@ -543,10 +543,9 @@ private
 
    for Reference_Type'Read use Read;
 
-   --  Three operations are used to optimize in the expansion of "for ... of"
-   --  loops: the Next(Cursor) procedure in the visible part, and the following
-   --  Pseudo_Reference and Get_Element_Access functions. See Sem_Ch5 for
-   --  details.
+   --  See Ada.Containers.Vectors for documentation on the following
+
+   procedure _Next (Position : in out Cursor) renames Next;
 
    function Pseudo_Reference
      (Container : aliased Map'Class) return Reference_Control_Type;
index fb7dccaf931416ff2ce3f8e3d931b3c8fe1269d5..bd82092fedb5620c46aba16183b7b00e9e9c0359 100644 (file)
@@ -623,10 +623,9 @@ private
 
    for Constant_Reference_Type'Write use Write;
 
-   --  Three operations are used to optimize in the expansion of "for ... of"
-   --  loops: the Next(Cursor) procedure in the visible part, and the following
-   --  Pseudo_Reference and Get_Element_Access functions. See Sem_Ch5 for
-   --  details.
+   --  See Ada.Containers.Vectors for documentation on the following
+
+   procedure _Next (Position : in out Cursor) renames Next;
 
    function Pseudo_Reference
      (Container : aliased Set'Class) return Reference_Control_Type;
index 840ef5af0e43aac47f90a1d64501fc3a5422d89b..a3bc206ee23dd83215a0dd1c423efdc497474116 100644 (file)
@@ -512,10 +512,10 @@ private
 
    for Reference_Type'Read use Read;
 
-   --  Three operations are used to optimize in the expansion of "for ... of"
-   --  loops: the Next(Cursor) procedure in the visible part, and the following
-   --  Pseudo_Reference and Get_Element_Access functions. See Exp_Ch5 for
-   --  details.
+   --  See Ada.Containers.Vectors for documentation on the following
+
+   procedure _Next (Position : in out Cursor) renames Next;
+   procedure _Previous (Position : in out Cursor) renames Previous;
 
    function Pseudo_Reference
      (Container : aliased Vector'Class) return Reference_Control_Type;
index 9b04a4b9139c6cc764e08fafeb6bc55a165739b1..70944526897419b66e9672c6d155e6f3249f37b2 100644 (file)
@@ -491,10 +491,7 @@ private
 
    for Reference_Type'Write use Write;
 
-   --  Three operations are used to optimize in the expansion of "for ... of"
-   --  loops: the Next(Cursor) procedure in the visible part, and the following
-   --  Pseudo_Reference and Get_Element_Access functions. See Exp_Ch5 for
-   --  details.
+   --  See Ada.Containers.Vectors for documentation on the following
 
    function Pseudo_Reference
      (Container : aliased Tree'Class) return Reference_Control_Type;
index c024ce59ce5b6fad30619637c2386704fae26f54..1005985cee8647462e720a5680c28fd60373dae3 100644 (file)
@@ -829,10 +829,13 @@ private
 
    for Reference_Type'Read use Read;
 
-   --  Three operations are used to optimize in the expansion of "for ... of"
-   --  loops: the Next(Cursor) procedure in the visible part, and the following
-   --  Pseudo_Reference and Get_Element_Access functions. See Exp_Ch5 for
-   --  details.
+   --  Three operations are used to optimize the expansion of "for ... of"
+   --  loops: the Next(Cursor) (or Previous) procedure in the visible part,
+   --  and the following Pseudo_Reference and Get_Element_Access functions.
+   --  See Exp_Ch5 for details, including the leading underscores here.
+
+   procedure _Next (Position : in out Cursor) renames Next;
+   procedure _Previous (Position : in out Cursor) renames Previous;
 
    function Pseudo_Reference
      (Container : aliased Vector'Class) return Reference_Control_Type;
index 7922e7bafc63f4ede11a6f1bac4575e8732ed049..1948e2a43275adcc0c3c6d13480166fea5f394a8 100644 (file)
@@ -357,10 +357,10 @@ private
 
    for Reference_Type'Write use Write;
 
-   --  Three operations are used to optimize in the expansion of "for ... of"
-   --  loops: the Next(Cursor) procedure in the visible part, and the following
-   --  Pseudo_Reference and Get_Element_Access functions.  See Sem_Ch5 for
-   --  details.
+   --  See Ada.Containers.Vectors for documentation on the following
+
+   procedure _Next (Position : in out Cursor) renames Next;
+   procedure _Previous (Position : in out Cursor) renames Previous;
 
    function Pseudo_Reference
      (Container : aliased Map'Class) return Reference_Control_Type;
index 7596ed698f5103e4a4487175d90832c6a5edd713..8888a8c1e57cbf5cff48d9e0f95a659c0451e3ae 100644 (file)
@@ -437,10 +437,10 @@ private
 
    for Constant_Reference_Type'Read use Read;
 
-   --  Three operations are used to optimize in the expansion of "for ... of"
-   --  loops: the Next(Cursor) procedure in the visible part, and the following
-   --  Pseudo_Reference and Get_Element_Access functions. See Sem_Ch5 for
-   --  details.
+   --  See Ada.Containers.Vectors for documentation on the following
+
+   procedure _Next (Position : in out Cursor) renames Next;
+   procedure _Previous (Position : in out Cursor) renames Previous;
 
    function Pseudo_Reference
      (Container : aliased Set'Class) return Reference_Control_Type;
index f2cf41396f8e495743cf591be3559aad37469839..f5fc020a4edf612961a1f631b7329a46c0a7c83a 100644 (file)
@@ -27,6 +27,7 @@ with Atree;    use Atree;
 with Csets;    use Csets;
 with Errout;   use Errout;
 with Hostparm; use Hostparm;
+with Lib;      use Lib;
 with Namet;    use Namet;
 with Opt;      use Opt;
 with Sinput;   use Sinput;
@@ -2051,7 +2052,15 @@ package body Scng is
          --  Underline character
 
          when '_' =>
-            Error_Msg_S ("identifier cannot start with underline");
+            --  Identifiers with leading underscores are not allowed in Ada.
+            --  However, we allow them in the run-time library, so we can
+            --  create names that are hidden from normal Ada code. For an
+            --  example, search for "Name_uNext", which is "_Next".
+
+            if not In_Internal_Unit (Scan_Ptr) then
+               Error_Msg_S ("identifier cannot start with underline");
+            end if;
+
             Name_Len := 1;
             Name_Buffer (1) := '_';
             Scan_Ptr := Scan_Ptr + 1;
index dbf711ddecaad43bf42b5418ab230a53d2d4db32..0a1ff80dbd20c8a34b47a3c689229be9be65955c 100644 (file)
@@ -1375,7 +1375,9 @@ package Snames is
    Name_Has_Element                      : constant Name_Id := N + $;
    Name_Forward_Iterator                 : constant Name_Id := N + $;
    Name_Reversible_Iterator              : constant Name_Id := N + $;
+   Name_uNext                            : constant Name_Id := N + $;
    Name_Previous                         : constant Name_Id := N + $;
+   Name_uPrevious                        : constant Name_Id := N + $;
    Name_Pseudo_Reference                 : constant Name_Id := N + $;
    Name_Reference_Control_Type           : constant Name_Id := N + $;
    Name_Get_Element_Access               : constant Name_Id := N + $;