diff mbox series

[Ada] Fix references to old variables that have been refactored

Message ID 20220602090908.GA1010889@adacore.com
State New
Headers show
Series [Ada] Fix references to old variables that have been refactored | expand

Commit Message

Pierre-Marie de Rodat June 2, 2022, 9:09 a.m. UTC
Local_Entity_Suppress and Global_Entity_Suppress variables referencing
tables were refactored to Local_Suppress_Stack_Top and
Global_Suppress_Stack_Top stacks back in 2007.  Fix remaining references
to these variables.

Tested on x86_64-pc-linux-gnu, committed on trunk

gcc/ada/

	* einfo.ads: Fix reference to Global_Entity_Suppress and
	Local_Entity_Suppress variable in the comments.
	* sem.ads: Likewise.
	* sem_prag.adb: Likewise.
diff mbox series

Patch

diff --git a/gcc/ada/einfo.ads b/gcc/ada/einfo.ads
--- a/gcc/ada/einfo.ads
+++ b/gcc/ada/einfo.ads
@@ -605,10 +605,10 @@  package Einfo is
 
 --    Checks_May_Be_Suppressed
 --       Defined in all entities. Set if a pragma Suppress or Unsuppress
---       mentions the entity specifically in the second argument. If this
---       flag is set the Global_Entity_Suppress and Local_Entity_Suppress
---       tables must be consulted to determine if there actually is an active
---       Suppress or Unsuppress pragma that applies to the entity.
+--       mentions the entity specifically in the second argument. If this flag
+--       is set the global and local suppress stacks must be consulted to
+--       determine if there actually is an active Suppress or Unsuppress pragma
+--       that applies to the entity.
 
 --    Class_Postconditions
 --       Defined on subprogram entities. Set if the subprogram has class-wide


diff --git a/gcc/ada/sem.ads b/gcc/ada/sem.ads
--- a/gcc/ada/sem.ads
+++ b/gcc/ada/sem.ads
@@ -327,8 +327,8 @@  package Sem is
    --  using pragma Check_Name), are handled as follows. If a suppress or
    --  unsuppress pragma is encountered for a given entity, then the flag
    --  Checks_May_Be_Suppressed is set in the entity and an entry is made in
-   --  either the Local_Entity_Suppress stack (case of pragma that appears in
-   --  other than a package spec), or in the Global_Entity_Suppress stack (case
+   --  either the local suppress stack (case of pragma that appears in
+   --  other than a package spec), or in the global suppress stack (case
    --  of pragma that appears in a package spec, which is by the rule of RM
    --  11.5(7) applicable throughout the life of the entity). Similarly, a
    --  Suppress/Unsuppress pragma for a non-predefined check which does not
@@ -340,7 +340,7 @@  package Sem is
    --  other point is that we have to make sure that we have proper nested
    --  interaction between such specific pragmas and locally applied general
    --  pragmas applying to all entities. This is achieved by including in the
-   --  Local_Entity_Suppress table dummy entries with an empty Entity field
+   --  local suppress stack dummy entries with an empty Entity field
    --  that are applicable to all entities. A similar search is needed for any
    --  non-predefined check even if no specific entity is involved.
 
@@ -359,18 +359,18 @@  package Sem is
    --  applies, and gives the right result when such pragmas are used even
    --  in complex cases of nested Suppress and Unsuppress pragmas.
 
-   --  The Local_Entity_Suppress and Global_Entity_Suppress stacks are handled
-   --  using dynamic allocation and linked lists. We do not often use this
-   --  approach in the compiler (preferring to use extensible tables instead).
-   --  The reason we do it here is that scope stack entries save a pointer to
-   --  the current local stack top, which is also saved and restored on scope
-   --  exit. Furthermore for processing of generics we save pointers to the
-   --  top of the stack, so that the local stack is actually a tree of stacks
-   --  rather than a single stack, a structure that is easy to represent using
-   --  linked lists, but impossible to represent using a single table. Note
-   --  that because of the generic issue, we never release entries in these
-   --  stacks, but that's no big deal, since we are unlikely to have a huge
-   --  number of Suppress/Unsuppress entries in a single compilation.
+   --  The local and global suppress stacks are handled using dynamic
+   --  allocation and linked lists. We do not often use this approach in the
+   --  compiler (preferring to use extensible tables instead). The reason we do
+   --  it here is that scope stack entries save a pointer to the current local
+   --  stack top, which is also saved and restored on scope exit. Furthermore
+   --  for processing of generics we save pointers to the top of the stack, so
+   --  that the local stack is actually a tree of stacks rather than a single
+   --  stack, a structure that is easy to represent using linked lists, but
+   --  impossible to represent using a single table. Note that because of the
+   --  generic issue, we never release entries in these stacks, but that's no
+   --  big deal, since we are unlikely to have a huge number of
+   --  Suppress/Unsuppress entries in a single compilation.
 
    type Suppress_Stack_Entry;
    type Suppress_Stack_Entry_Ptr is access all Suppress_Stack_Entry;


diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb
--- a/gcc/ada/sem_prag.adb
+++ b/gcc/ada/sem_prag.adb
@@ -11000,7 +11000,7 @@  package body Sem_Prag is
                Scope_Suppress.Suppress (C) := Suppress_Case;
             end if;
 
-            --  Also make an entry in the Local_Entity_Suppress table
+            --  Also push an entry in the local suppress stack
 
             Push_Local_Suppress_Stack_Entry
               (Entity   => Empty,