]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
ada: Remove unused AST flag Address_Warning_Posted
authorPiotr Trojanek <trojanek@adacore.com>
Mon, 23 Dec 2024 09:49:11 +0000 (10:49 +0100)
committerMarc Poulhiès <dkm@gcc.gnu.org>
Tue, 7 Jan 2025 12:33:35 +0000 (13:33 +0100)
Flag Address_Warning_Posted was only read and never written, so it can be
safely removed.

gcc/ada/ChangeLog:

* gen_il-fields.ads (Opt_Field_Enum): Remove flag.
* gen_il-gen-gen_nodes.adb (N_Attribute_Definition_Clause): Remove
field.
* sem_ch13.adb (Validate_Address_Clauses): Remove read of the flag.
* sinfo.ads (Address_Warning_Posted): Remove flag description.

gcc/ada/gen_il-fields.ads
gcc/ada/gen_il-gen-gen_nodes.adb
gcc/ada/sem_ch13.adb
gcc/ada/sinfo.ads

index fe2da80c548819893ba37d8b2ee848e085308f81..789fb76875d6ea4d5aad40e35706903d8a2ba8f0 100644 (file)
@@ -65,7 +65,6 @@ package Gen_IL.Fields is
       Activation_Chain_Entity,
       Acts_As_Spec,
       Actual_Designated_Subtype,
-      Address_Warning_Posted,
       Aggregate_Bounds_Or_Ancestor_Type,
       Aliased_Present,
       All_Others,
index c3a97e6e16e62757faa531ec925d1014d50c58ec..b361aeeca1d1f9b52aba77ccbcff721c609c826e 100644 (file)
@@ -98,7 +98,6 @@ begin -- Gen_IL.Gen.Gen_Nodes
        (Sy (Name, Node_Id, Default_Empty),
         Sy (Chars, Name_Id, Default_No_Name),
         Sy (Expression, Node_Id, Default_Empty),
-        Sm (Address_Warning_Posted, Flag),
         Sm (Check_Address_Alignment, Flag),
         Sm (Entity_Or_Associated_Node, Node_Id), -- just Entity
         Sm (From_Aspect_Specification, Flag),
index 2beb6b95daf3f485ae94b615ebcb465c53c29690..00489722921a349ebe8e8f8b22267788d31ca540 100644 (file)
@@ -18055,11 +18055,9 @@ package body Sem_Ch13 is
             X_Offs : Uint;
 
          begin
-            --  Skip processing of this entry if warning already posted, or if
-            --  alignments are not set.
+            --  Skip processing of this entry if alignments are not set
 
-            if not Address_Warning_Posted (ACCR.N)
-              and then Known_Alignment (ACCR.X)
+            if Known_Alignment (ACCR.X)
               and then Known_Alignment (ACCR.Y)
             then
                Expr := Original_Node (Expression (ACCR.N));
index e9b2f0f3c5c8b09dde320424d5aa69832ccdf41b..94bbb2f974e48525ff3c53f3e14e7030613a7710 100644 (file)
@@ -788,11 +788,6 @@ package Sinfo is
    --    created for the expansion of an allocator with a subtype_indication
    --    and the designated subtype is an unconstrained composite type.
 
-   --  Address_Warning_Posted
-   --    Present in N_Attribute_Definition nodes. Set to indicate that we have
-   --    posted a warning for the address clause regarding size or alignment
-   --    issues. Used to inhibit multiple redundant messages.
-
    --  Aggregate_Bounds
    --    Present in array N_Aggregate nodes. If the bounds of the aggregate are
    --    known at compile time, this field points to an N_Range node with those
@@ -7549,7 +7544,6 @@ package Sinfo is
       --  Check_Address_Alignment
       --  From_Aspect_Specification
       --  Is_Delayed_Aspect
-      --  Address_Warning_Posted
 
       --  Note: if From_Aspect_Specification is set, then Sloc points to the
       --  aspect name, and Entity is resolved already to reference the entity