From e31f60f31da89f3c79b6dd8488a7eff03c689f1b Mon Sep 17 00:00:00 2001 From: Piotr Trojanek Date: Mon, 8 Jun 2020 14:33:08 +0200 Subject: [PATCH] [Ada] Simplify detection of others choice with just one value gcc/ada/ * sem_case.adb (Build_Choice): Simplify. --- gcc/ada/sem_case.adb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/ada/sem_case.adb b/gcc/ada/sem_case.adb index 5bb94e26ea6..953619c91e4 100644 --- a/gcc/ada/sem_case.adb +++ b/gcc/ada/sem_case.adb @@ -1012,7 +1012,7 @@ package body Sem_Case is -- If there is only one choice value missing between Value1 and -- Value2, build an integer or enumeration literal to represent it. - if (Value2 - Value1) = 0 then + if Value1 = Value2 then if Is_Integer_Type (Choice_Type) then Lit_Node := Make_Integer_Literal (Loc, Value1); Set_Etype (Lit_Node, Choice_Type); -- 2.30.2