On 13/05/2014 17:48, in article
9b878576-efa3-42ca...@googlegroups.com, "Martin"
Type resolution in conditional expressions by GNAT GPL 2012/2013 was not all
it should have been. E.g. I had to make the second 0 into a qualified
expression in:
function XR (X : M.i04)
return M.i64 is
begin
return (if X = 0 then M.i64'(0) else GR(X));
end XR;
because GNAT could not otherwise deduce its intended type, even though GR(X)
and the expected return type are both M.i64.
I am happy to say this is now fixed in GNAT GPL 2014.
But, I still have to write this:
for s in slice'Range loop
exit when slice(s) = all_blanks_code;
h := rotate_left(h, 2) + slice(s);
end loop;
To avoid this:
for s of slice loop
exit when s = all_blanks_code;
|
>>> warning: variable "s" is not modified in loop body
>>> warning: possible infinite loop
h := rotate_left(h, 2) + s;
end loop;
So that bug remains.
--
Bill Findlay
with
blueyonder.co.uk;
use surname & forename;