https://gcc.gnu.org/g:53b215c0ca2792a0fd838be6e331d735bad409c7

commit r15-2612-g53b215c0ca2792a0fd838be6e331d735bad409c7
Author: Ghjuvan Lacambre <lacam...@adacore.com>
Date:   Wed Jun 26 16:08:20 2024 +0200

    ada: Stop ignoring Component_Size attribute in CodePeer_Mode
    
    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.

Diff:
---
 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 957c43d689bb..a7936641d343 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

Reply via email to