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,56250291936154a0 X-Google-Attributes: gid103376,public From: Robert Dewar Subject: Re: OS Bindings (was: Where is the elusive jump command?) Date: 2000/04/15 Message-ID: <8d9qa8$3ff$1@nnrp1.deja.com>#1/1 X-Deja-AN: 611496094 References: <38D771CA.D41AF9B5@port.ac.uk><8bq7ku$mc8$1@nnrp1.deja.com><38E0E723.C39C392@quadruscorp.com><8brfm4$4uc$1@nnrp1.deja.com><8brn4k$p6i$1@slb0.atl.mindspring.net><8brrpj$i04$1@nnrp1.deja.com><38E312F8.78883ACB@icn.siemens.de><8c4rvf$d9k$1@nnrp1.deja.com><2000Apr5.070127.1@eisner><2000Apr6.081305.1@eisner><8ci6vf$r5a$1@nnrp1.deja.com><8ck638$krs3@ftp.kvaerner.com><8cp23c$4gp$1@nnrp1.deja.com><8csjs8$o2p3@ftp.kvaerner.com><8d0su8$bqt$1@nnrp1.deja.com> <8d20bq$o2p4@ftp.kvaerner.com> <8d457u$5n33@ftp.kvaerner.com> X-Http-Proxy: 1.0 x43.deja.com:80 (Squid/1.1.22) for client 205.232.38.14 Organization: Deja.com - Before you buy. X-Article-Creation-Date: Sat Apr 15 13:20:14 2000 GMT X-MyDeja-Info: XMYDJUIDrobert_dewar Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/4.61 [en] (OS/2; I) Date: 2000-04-15T00:00:00+00:00 List-Id: In article <8d457u$5n33@ftp.kvaerner.com>, "Tarjei T. Jensen" wrote: > I think it is a glaring oversight in the standard if it not > only allows, but > requires compilers to honour a definition like the one above. > I don't have the > final version of the RM here, only the June 94 version. Great, so here we go again. Obviously we can't mandate 64-bit integer support, since the burden would be too great on small processors. And if you disagree, just change 64 to a larger power of 2. Tarjei says "if you implement n-bit arithmetic, then you must implement full range unsigned n-bit arithmetic with overflow checking." AARGH! the Ada 83 mentality at work again. The mentality that says, you don't need to implement X, but if you implement X you must implement Y. I trust that Tarjei understands that it would be a lot of extra work to implement this new form of checked arithmetic. The consequence of Tarjei's suggested change might well be that compilers decide, "oh well, 64-bit integer arithmetic is too much of a pain anyway", and simply don't do it at all. Suppose this "glaring defect" were fixed in the RM. Then GNAT would have a lot of extra work to do, maybe we would do it, but maybe we would simply remove 64-bit arithmetic completely (actually put it under an extension switch) so it was not considered part of the core. Never encourage implementors to do less by making it harder than necessary for them to do more! We have unsigned 64-bit arithmetic similar to the capabilities of C (well at least GNU-C) and Java in Ada. Yes, that's not ideal, and for many applications a range checked 64-bit range would be better. But please don't let best be the enemy of good. Sent via Deja.com http://www.deja.com/ Before you buy.