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/13 Message-ID: <8d41rd$6622@ftp.kvaerner.com>#1/1 X-Deja-AN: 610582529 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> <8csjs8$o2p3@ftp.kvaerner.com> <8d0su8$bqt$1@nnrp1.deja.com> <8d1ocu$5n31@ftp.kvaerner.com> <8d2dfo$28u$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-13T00:00:00+00:00 List-Id: Robert Dewar wrote > >I disagree, unsigned in C *is* a modular type, you are saying >that it is often used in ways that do not take advantage of >the modular semantics, but for sure the modular type of Ada >is the right mapping, since it has identical semantics to the >C type. It would be quite wrong to map this into a non-modular >type, since in the general case, the wrapping semantics of >unsigned in C may be critical in a particular interface >situation. The modular semantics of a type like size_t in C is a side effect. It is wrong to blindly translate any unsinged type to a modular type in Ada. The C designers used the unsigned type because it was available and had the required range and not because of its modular semantics. Only a language lawyer would think that it would be sensible for size_t to be a modular type in Ada. And the person whould have to disregard the context and the intention of the designers. I think you will find it difficult to find many places in the standard C libraries where the modular semantics of any unsigned type is of importance or where anything would fail if the type was not modular. The situation is most likely to be quite the oposite; that errors or potential errors will be found which could have cause programs to fail in mysterious ways. Greetings,