[fpc-devel] Simple cast compiled as AS with -CR

Ondrej Pokorny lazarus at kluug.net
Mon Jan 2 17:50:15 CET 2017


On 30.12.2016 11:27, Jonas Maebe wrote:
> Yes, this is by design. The above code is invalid and relies on 
> implementation details to work. E.g. with a JVM or CIL backend, the 
> code would be rejected by the bytecode verifier too.

Thank you Jonas for clarification. It may be worth to document it - 
neither {$OBJECTCHECKS } nor -CR tell about cast checking.

http://www.freepascal.org/docs-html/3.0.0/prog/progsu57.html#x64-630001.2.57 

http://www.freepascal.org/docs-html/3.0.0/user/userap1.html

Ondrej



More information about the fpc-devel mailing list