Code cleanup; semantics is unaffected.
gcc/ada/ChangeLog:
* exp_ch4.adb: (Expand_N_Not_In): Preserve Alternatives in expanded
membership operator just like preserving Right_Opnd (though only
one of these fields is present at a time).
* par-ch4.adb (P_Membership_Test): Remove redundant setting of fields
to their default values.
Make_Op_Not (Loc,
Right_Opnd =>
Make_In (Loc,
- Left_Opnd => Left_Opnd (N),
- Right_Opnd => Right_Opnd (N))));
-
- -- If this is a set membership, preserve list of alternatives
-
- Set_Alternatives (Right_Opnd (N), Alternatives (Original_Node (N)));
+ Left_Opnd => Left_Opnd (N),
+ Right_Opnd => Right_Opnd (N),
+ Alternatives => Alternatives (N))));
-- We want this to appear as coming from source if original does (see
-- transformations in Expand_N_In).
if Token = Tok_Vertical_Bar then
Error_Msg_Ada_2012_Feature ("set notation", Token_Ptr);
Set_Alternatives (N, New_List (Alt));
- Set_Right_Opnd (N, Empty);
-- Loop to accumulate alternatives
-- Not set case
else
- Set_Right_Opnd (N, Alt);
- Set_Alternatives (N, No_List);
+ Set_Right_Opnd (N, Alt);
end if;
end P_Membership_Test;