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 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: "Tarjei T. Jensen" Subject: Re: OS Bindings (was: Where is the elusive jump command?) Date: 2000/04/10 Message-ID: <8csjs8$o2p3@ftp.kvaerner.com>#1/1 X-Deja-AN: 609089406 Content-Transfer-Encoding: 7bit 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> Content-Type: text/plain; charset="iso-8859-1" X-MimeOLE: Produced By Microsoft MimeOLE V4.72.2120.0 Organization: Kv�rner Group IT Mime-Version: 1.0 Newsgroups: comp.lang.ada Date: 2000-04-10T00:00:00+00:00 List-Id: Robert Dewar wrote in message <8cp23c$4gp$1@nnrp1.deja.com>... >In article <8ck638$krs3@ftp.kvaerner.com>, > "Tarjei T. Jensen" wrote: >> A good example of this is the definitions in the interfaces.C. >> The unsigned types are really useless and undermines the type >> safety we should expect from Ada. These definitions fails >> completely to capture the spirit of the usage in C. > >I am completely mystefied by the above, it includes a number >of very curious assertions, with absolutely no indication of >the strange theory that must underlie these assertions. From >where I see things, there is no undermining of type safety in >these declarations, and they capture the semantics of C >unsigned types perfectly. Unsigned in C might have similar semantics to modular types in that there is no range checking. In C, unsigned types are used for types like size_t NOT because there is no range checking, but because of the range. max(unsigned) > max(int). An unsigned type allows for bigger files or whatever than a similar sized signed value. In most cases where an unsigned type like size_t is used it is apropriate to translate it to an unsigned integer of some sort and not a modular type. Arithmetic operations which causes wraparound are most likely errors and should be caught. Now I have to remember to check interface.C when I get home, to check verify that the definition of int, short and long in gnat has C semantics. Greetings,