-- set the appropriate flag to remove the loop entirely
-- during expansion.
- Set_Is_Null_Loop (Loop_Nod);
+ if Nkind (Loop_Nod) = N_Loop_Statement then
+ Set_Is_Null_Loop (Loop_Nod);
+ end if;
+
Null_Range := True;
end if;
-- since it is likely that these warnings will be inappropriate
-- if the loop never actually executes, which is likely.
- Set_Suppress_Loop_Warnings (Loop_Nod);
+ if Nkind (Loop_Nod) = N_Loop_Statement then
+ Set_Suppress_Loop_Warnings (Loop_Nod);
+ end if;
-- The other case for a warning is a reverse loop where the
-- upper bound is the integer literal zero or one, and the
Subtype_Mark (DS));
end if;
- Set_Is_Null_Loop (Loop_Nod);
- Null_Range := True;
+ if Nkind (Loop_Nod) = N_Loop_Statement then
+ Set_Is_Null_Loop (Loop_Nod);
- -- Suppress other warnings about the body of the loop, as
- -- it will never execute.
- Set_Suppress_Loop_Warnings (Loop_Nod);
+ -- Suppress other warnings about the body of the loop,
+ -- as it will never execute.
+ Set_Suppress_Loop_Warnings (Loop_Nod);
+ end if;
end if;
end;
end if;