From: Ghjuvan Lacambre <lacam...@adacore.com>

This piece of code was introduced in 2011 in order to prevent spurious
false positives from appearing on specific code patterns making use of
Component_Size.
It seems that now this piece of code is causing small false positives
instead of preventing them, so let's remove it.

gcc/ada/

        * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Stop
        ignoring Component_Size attribute in CodePeer_Mode.

Tested on x86_64-pc-linux-gnu, committed on master.

---
 gcc/ada/sem_ch13.adb | 18 ------------------
 1 file changed, 18 deletions(-)

diff --git a/gcc/ada/sem_ch13.adb b/gcc/ada/sem_ch13.adb
index 957c43d689b..a7936641d34 100644
--- a/gcc/ada/sem_ch13.adb
+++ b/gcc/ada/sem_ch13.adb
@@ -6079,24 +6079,6 @@ package body Sem_Ch13 is
          Check_Restriction_No_Specification_Of_Aspect (N);
       end if;
 
-      --  Ignore some selected attributes in CodePeer mode since they are not
-      --  relevant in this context.
-
-      if CodePeer_Mode then
-         case Id is
-
-            --  Ignore Component_Size in CodePeer mode, to avoid changing the
-            --  internal representation of types by implicitly packing them.
-
-            when Attribute_Component_Size =>
-               Rewrite (N, Make_Null_Statement (Sloc (N)));
-               return;
-
-            when others =>
-               null;
-         end case;
-      end if;
-
       --  Process Ignore_Rep_Clauses option
 
       if Ignore_Rep_Clauses then
-- 
2.45.2

Reply via email to