From: Piotr Trojanek Date: Mon, 23 Nov 2020 22:44:06 +0000 (+0100) Subject: [Ada] Refactor repeated code for component attributes X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=10853d6e8a0cc92f2dcf2a396db9ae73f75b5abc;p=gcc.git [Ada] Refactor repeated code for component attributes gcc/ada/ * sem_attr.adb (Analyze_Attribute): Merge identical code for First_Bit/Last_Bit and Position attributes. --- diff --git a/gcc/ada/sem_attr.adb b/gcc/ada/sem_attr.adb index 30fdfb8c55d..537da93dc66 100644 --- a/gcc/ada/sem_attr.adb +++ b/gcc/ada/sem_attr.adb @@ -4094,6 +4094,7 @@ package body Sem_Attr is when Attribute_First_Bit | Attribute_Last_Bit + | Attribute_Position => Check_Component; Set_Etype (N, Universal_Integer); @@ -5305,9 +5306,7 @@ package body Sem_Attr is -- Position -- -------------- - when Attribute_Position => - Check_Component; - Set_Etype (N, Universal_Integer); + -- Shares processing with First_Bit attribute ---------- -- Pred --