From: Ghjuvan Lacambre Date: Fri, 9 May 2025 09:20:18 +0000 (+0200) Subject: ada: freeze.adb: do not emit error on non-aligned component in CodePeer_Mode X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9a60db69ed6ab56a31027f1d509734362899c7e8;p=thirdparty%2Fgcc.git ada: freeze.adb: do not emit error on non-aligned component in CodePeer_Mode 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. --- 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