mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-05 10:50:51 +08:00
[Ada] Simplify detection of others choice with just one value
gcc/ada/ * sem_case.adb (Build_Choice): Simplify.
This commit is contained in:
parent
4211ccbbae
commit
e31f60f31d
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user