diff options
author | Piotr Trojanek <trojanek@adacore.com> | 2024-12-23 10:49:11 +0100 |
---|---|---|
committer | Marc Poulhiès <dkm@gcc.gnu.org> | 2025-01-07 13:33:35 +0100 |
commit | a80bb3525e6e3596e025399691dc7789268fffe2 (patch) | |
tree | 751e5c18f885a151c45749f3f48276e91ceb1799 /gcc | |
parent | 0f1bc0d5c0b7b77f3ec0704f9f999cceef13adea (diff) | |
download | gcc-a80bb3525e6e3596e025399691dc7789268fffe2.zip gcc-a80bb3525e6e3596e025399691dc7789268fffe2.tar.gz gcc-a80bb3525e6e3596e025399691dc7789268fffe2.tar.bz2 |
ada: Remove unused AST flag Address_Warning_Posted
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.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ada/gen_il-fields.ads | 1 | ||||
-rw-r--r-- | gcc/ada/gen_il-gen-gen_nodes.adb | 1 | ||||
-rw-r--r-- | gcc/ada/sem_ch13.adb | 6 | ||||
-rw-r--r-- | gcc/ada/sinfo.ads | 6 |
4 files changed, 2 insertions, 12 deletions
diff --git a/gcc/ada/gen_il-fields.ads b/gcc/ada/gen_il-fields.ads index fe2da80..789fb76 100644 --- a/gcc/ada/gen_il-fields.ads +++ b/gcc/ada/gen_il-fields.ads @@ -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, diff --git a/gcc/ada/gen_il-gen-gen_nodes.adb b/gcc/ada/gen_il-gen-gen_nodes.adb index c3a97e6..b361aee 100644 --- a/gcc/ada/gen_il-gen-gen_nodes.adb +++ b/gcc/ada/gen_il-gen-gen_nodes.adb @@ -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), diff --git a/gcc/ada/sem_ch13.adb b/gcc/ada/sem_ch13.adb index 2beb6b9..0048972 100644 --- a/gcc/ada/sem_ch13.adb +++ b/gcc/ada/sem_ch13.adb @@ -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)); diff --git a/gcc/ada/sinfo.ads b/gcc/ada/sinfo.ads index e9b2f0f..94bbb2f 100644 --- a/gcc/ada/sinfo.ads +++ b/gcc/ada/sinfo.ads @@ -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 |