Developer Center |
Sunday August 21, 2005
Using a membership test X in Y is a wrong way to test for having an invalid representation (here Y is the subtype of X). The compiler can assume tha X is valid and elide the test. The proper way to do this is to use the ‘Valid attribute. The compiler now recognizes such dubious membership tests and replaces them with appropriate ‘Valid tests, generating warning messages.
Posted
in Development Log, GNAT Compilation System