diff options
author | Piotr Trojanek <trojanek@adacore.com> | 2020-06-08 14:33:08 +0200 |
---|---|---|
committer | Pierre-Marie de Rodat <derodat@adacore.com> | 2020-07-16 05:18:02 -0400 |
commit | e31f60f31da89f3c79b6dd8488a7eff03c689f1b (patch) | |
tree | 1d402020abe69962c8403b11d259375154c495e3 /gcc | |
parent | 4211ccbbaed452f0363cf257b98f3236f442bfca (diff) | |
download | gcc-e31f60f31da89f3c79b6dd8488a7eff03c689f1b.zip gcc-e31f60f31da89f3c79b6dd8488a7eff03c689f1b.tar.gz gcc-e31f60f31da89f3c79b6dd8488a7eff03c689f1b.tar.bz2 |
[Ada] Simplify detection of others choice with just one value
gcc/ada/
* sem_case.adb (Build_Choice): Simplify.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ada/sem_case.adb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/ada/sem_case.adb b/gcc/ada/sem_case.adb index 5bb94e2..953619c 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); |