Home | Contact | Pricing | News | Partners | Mailing List | Site Map

Developer Center

[GNAT] Better handling of invalid values

Tuesday August 19, 2008

Previously the compiler always assumed that values were in range of their subtypes, except for the case of a use of ‘Valid. This meant that in the case of invalid representations, there could be surprising behavior. The compiler now avoids such assumptions in default mode, leading to less surprising behavior. The old behavior, which may be more efficient in some cases can be restored by using the -gnatB switch or by use of the configuration pragma Assume_No_Invalid_Values (On).

 

Posted by Posted in Development Log, GNAT Compilation System