From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: * X-Spam-Status: No, score=1.3 required=5.0 tests=BAYES_00,INVALID_MSGID, MSGID_RANDY autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,fee8802cc3d8334d X-Google-Attributes: gid103376,public X-Google-Thread: 10a146,fee8802cc3d8334d X-Google-Attributes: gid10a146,public From: Robert Dewar Subject: Re: Ada and Java. different behaviour. casting long to int problem. Date: 1999/06/12 Message-ID: <7ju351$d7u$1@nnrp1.deja.com>#1/1 X-Deja-AN: 488810485 References: <7jt2c0$vrb@drn.newsguy.com> <7jt69l$143f@drn.newsguy.com> X-Http-Proxy: 1.0 x40.deja.com:80 (Squid/1.1.22) for client 205.232.38.14 Organization: Deja.com - Share what you know. Learn what you don't. X-Article-Creation-Date: Sat Jun 12 16:50:43 1999 GMT Newsgroups: comp.lang.ada,comp.lang.java.programmer X-Http-User-Agent: Mozilla/4.04 [en] (OS/2; I) Date: 1999-06-12T00:00:00+00:00 List-Id: In article , jerry@jvdsys.stuyts.nl wrote: > nabbasi@pacbell.net.NOSPAM wrote: > > The super-secret GNAT documentation will tell you that this is > a very > expensive check to perform, so it is by default disabled. The very here is Jerry's invention :-) The actual quote from the documentation is: We treat integer overflow specially because these are quite expensive and in our experience are not as important as other run-time checks in the development process. and the "quite" here is probably right. We have in fact steadily improved the quality of code for -gnato, so the penalty has been reduced. It would be interesting to know what actual programs see as a result of -gnato being off or on. Note that the reason that overflow checking is rather different from other checks is that it does not introduce safety issues. You may get unexpected (e.g. modular wrapped) values, but you don't get wild jumps, loads or stores as a result of overflow checking being off. > -- Jerry van Dijk | Leiden, Holland > -- Team Ada | jdijk@acm.org > -- see http://stad.dsl.nl/~jvandyk > Sent via Deja.com http://www.deja.com/ Share what you know. Learn what you don't.