From: Piotr Trojanek Date: Mon, 23 Nov 2020 23:18:47 +0000 (+0100) Subject: [Ada] Refactor repeated code for Width attributes X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ce20ff0260c24c3da9012e4226e9eb04d01a5221;p=gcc.git [Ada] Refactor repeated code for Width attributes gcc/ada/ * sem_attr.adb (Analyze_Attribute): Merge identical code for Wide_Wide_Width, Wide_Width and Width attributes. --- diff --git a/gcc/ada/sem_attr.adb b/gcc/ada/sem_attr.adb index 4e4c27a297a..285b2606b7d 100644 --- a/gcc/ada/sem_attr.adb +++ b/gcc/ada/sem_attr.adb @@ -7219,7 +7219,10 @@ package body Sem_Attr is -- Wide_Wide_Width -- --------------------- - when Attribute_Wide_Wide_Width => + when Attribute_Wide_Wide_Width + | Attribute_Wide_Width + | Attribute_Width + => Check_E0; Check_Scalar_Type; Set_Etype (N, Universal_Integer); @@ -7228,19 +7231,13 @@ package body Sem_Attr is -- Wide_Width -- ---------------- - when Attribute_Wide_Width => - Check_E0; - Check_Scalar_Type; - Set_Etype (N, Universal_Integer); + -- Shares processing with Wide_Wide_Width attribute ----------- -- Width -- ----------- - when Attribute_Width => - Check_E0; - Check_Scalar_Type; - Set_Etype (N, Universal_Integer); + -- Shares processing with Wide_Wide_Width attribute --------------- -- Word_Size --