diff options
Diffstat (limited to 'gcc/ada/sem_ch13.adb')
-rw-r--r-- | gcc/ada/sem_ch13.adb | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/gcc/ada/sem_ch13.adb b/gcc/ada/sem_ch13.adb index a4848fe..98fd99e 100644 --- a/gcc/ada/sem_ch13.adb +++ b/gcc/ada/sem_ch13.adb @@ -2108,11 +2108,28 @@ package body Sem_Ch13 is Set_Analyzed (N, True); 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 (we also ignore rep clauses in - -- CodePeer mode or Alfa mode, since they are not relevant in these - -- contexts). + -- Alfa mode, since they are not relevant in this context). - if Ignore_Rep_Clauses or CodePeer_Mode or Alfa_Mode then + if Ignore_Rep_Clauses or Alfa_Mode then case Id is -- The following should be ignored. They do not affect legality |