From: Piotr Trojanek Date: Mon, 23 Nov 2020 15:50:17 +0000 (+0100) Subject: [Ada] Refactor duplicated code for Denorm and Signed_Zeros attributes X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e5f53db770e33d78e415be1766f9ebf36e5152e6;p=gcc.git [Ada] Refactor duplicated code for Denorm and Signed_Zeros attributes gcc/ada/ * sem_attr.adb (Analyze_Attribute): Merge identical code for Denorm and Signed_Zeros attributes. --- diff --git a/gcc/ada/sem_attr.adb b/gcc/ada/sem_attr.adb index 8f118afe25a..4ec22ae8fe7 100644 --- a/gcc/ada/sem_attr.adb +++ b/gcc/ada/sem_attr.adb @@ -3819,7 +3819,9 @@ package body Sem_Attr is -- Denorm -- ------------ - when Attribute_Denorm => + when Attribute_Denorm + | Attribute_Signed_Zeros + => Check_Floating_Point_Type_0; Set_Etype (N, Standard_Boolean); @@ -5949,9 +5951,7 @@ package body Sem_Attr is -- Signed_Zeros -- ------------------ - when Attribute_Signed_Zeros => - Check_Floating_Point_Type_0; - Set_Etype (N, Standard_Boolean); + -- Shares processing with Denorm attribute ---------- -- Size --