From: Ghjuvan Lacambre <lacam...@adacore.com> These errors hinder analysis of non-GNAT code and are not useful to the user as CodePeer does not care about alignment.
gcc/ada/ChangeLog: * freeze.adb (Freeze_Record_Type): Check for CodePeer_Mode. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/freeze.adb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/gcc/ada/freeze.adb b/gcc/ada/freeze.adb index cf01102f073..be2115a9086 100644 --- a/gcc/ada/freeze.adb +++ b/gcc/ada/freeze.adb @@ -5451,9 +5451,12 @@ package body Freeze is Set_Must_Be_On_Byte_Boundary (Rec); -- Check for component clause that is inconsistent with - -- the required byte boundary alignment. + -- the required byte boundary alignment. Do not do this + -- in CodePeer_Mode, as we do not have sufficient info + -- on size and representation clauses. - if Present (CC) + if not CodePeer_Mode + and then Present (CC) and then Normalized_First_Bit (Comp) mod System_Storage_Unit /= 0 then -- 2.43.0