Home | Contact | Pricing | News | Events | Partners | Mailing List | Site Map
  • Development log
  • Technical papers
  • Live docs

More Resources

Recent Papers

Browse by Technology

Dev Log Archives

Developer Center

Better handling of membership tests

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 by Posted in Development Log, GNAT Compilation System