shreyas krishnan wrote:
Ideas, other pointers would be great
Note that of course this kind of check is standard in Ada and hence in GNAT, so you can get an idea from GNAT generated code how well the backend can eliminate such checks (answer: getting better with gcc 4).