From: Ronan Desplanques Date: Tue, 4 Mar 2025 13:29:07 +0000 (+0100) Subject: ada: Remove unnecessary special handling X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6ad0d51d4e1d4cc16a68d4e1c588c65849335493;p=thirdparty%2Fgcc.git ada: Remove unnecessary special handling This patch removes a special exemption in Enter_Name. That exemption was preceded by a comment which described what situations it was supposed to be required for, but it was unnecessary even in those situations. gcc/ada/ChangeLog: * sem_util.adb (Enter_Name): Remove special handling. --- diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb index 523aff33f95..59bf060ee74 100644 --- a/gcc/ada/sem_util.adb +++ b/gcc/ada/sem_util.adb @@ -8082,17 +8082,7 @@ package body Sem_Util is -- If we fall through, declaration is OK, at least OK enough to continue - -- If Def_Id is a discriminant or a record component we are in the midst - -- of inheriting components in a derived record definition. Preserve - -- their Ekind and Etype. - - if Ekind (Def_Id) in E_Discriminant | E_Component then - null; - - elsif Present (Etype (Def_Id)) then - null; - - else + if No (Etype (Def_Id)) then Set_Etype (Def_Id, Any_Type); -- avoid cascaded errors end if;