Right_Opnd => Make_Integer_Literal (Loc, Modv))));
-- Here we know that the modulus is larger than type'Last of the
- -- integer type. There are three possible cases to consider:
+ -- integer type. There are two cases to consider:
-- a) The integer value is non-negative. In this case, it is
-- returned as the result (since it is less than the modulus).
-- Furthermore, (-value - 1) can be expressed as -(value + 1)
-- which we can compute using the integer base type.
+ -- Once this is done we analyze the conditional expression without
+ -- range checks, because we know everything is in range, and we
+ -- want to prevent spurious warnings on either branch.
+
else
Rewrite (N,
Make_Conditional_Expression (Loc,
end if;
- Analyze_And_Resolve (N, Btyp);
+ Analyze_And_Resolve (N, Btyp, All_Checks);
end Mod_Case;
-----------