@@ -4163,12 +4163,7 @@ package body Sem_Res is
-- marked with Any_Type. Since the operation has been resolved to
-- the user-defined operator, that is irrelevant, so reset Etype.
- if Nkind (Original_Node (N)) in N_Op_Eq
- | N_Op_Ge
- | N_Op_Gt
- | N_Op_Le
- | N_Op_Lt
- | N_Op_Ne
+ if Nkind (Original_Node (N)) in N_Op_Compare
and then not Is_Boolean_Type (Etype (N))
then
Set_Etype (A, Etype (F));
@@ -14189,9 +14189,7 @@ package body Sem_Util is
begin
pragma Assert (Relaxed_RM_Semantics);
- pragma Assert
- (Nkind (N) in
- N_Null | N_Op_Eq | N_Op_Ge | N_Op_Gt | N_Op_Le | N_Op_Lt | N_Op_Ne);
+ pragma Assert (Nkind (N) in N_Null | N_Op_Compare);
if Nkind (N) = N_Null then
Rewrite (N, New_Occurrence_Of (RTE (RE_Null_Address), Sloc (N)));
@@ -26079,9 +26077,7 @@ package body Sem_Util is
if Nkind (N) = N_Null then
return Present (Typ) and then Is_Descendant_Of_Address (Typ);
- elsif Nkind (N) in
- N_Op_Eq | N_Op_Ge | N_Op_Gt | N_Op_Le | N_Op_Lt | N_Op_Ne
- then
+ elsif Nkind (N) in N_Op_Compare then
declare
L : constant Node_Id := Left_Opnd (N);
R : constant Node_Id := Right_Opnd (N);