If this still doesn't convince you, here's an example which doesn't
    use Ada.Unchecked_Conversion at all.

Well sure, reading an uninitialized value is erroneous except for the use
of 'Valid.

I'm not saying that things aren't broken, just being very careful in the
definition of what a "valid" value in an object is.  The point is that these
values are not "valid" (which is why 'Valid returns FALSE) and that the
compiler (specifically VRP) is *correct* in deducing that the values are
in the valid range of the type *except* for 'Valid and range checks.

Those checks need to be done another way, such as by using the "base type".
The issues with that have to do with debug output, representation within
Gigi, and whether the NOP_EXPRs that would have to be used to implement
that will be maintained.

Reply via email to