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,dec0a6ed5b5044de X-Google-Attributes: gid103376,public From: dewar@gnat.com Subject: Re: Code portability question Date: 1999/01/25 Message-ID: <78iikh$52p$1@nnrp1.dejanews.com>#1/1 X-Deja-AN: 436745593 References: <36A94B78.963F3215@wvu.edu> <36A9849C.A9FE01E4@rocketmail.com> <36AABFAA.2D844356@wvu.edu> <36AB878E.F51CA837@rocketmail.com> <78gem9$imp$1@nnrp1.dejanews.com> <36ABE8BF.FFBD087F@rocketmail.com> X-Http-Proxy: 1.0 x7.dejanews.com:80 (Squid/1.1.22) for client 205.232.38.14 Organization: Deja News - The Leader in Internet Discussion X-Article-Creation-Date: Mon Jan 25 20:02:32 1999 GMT Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/4.04 [en] (OS/2; I) Date: 1999-01-25T00:00:00+00:00 List-Id: In article <36ABE8BF.FFBD087F@rocketmail.com>, Corey Ashford wrote: > Assuming the machine they ended up on was SPARC, the > precision of float, long_float etc. may well be different > (they aren't different on the Rational Ada compiler, but > probably are on GNAT). Most certainly GNAT follows the implementation requirement of RM B.2(10): 10 Floating point types corresponding to each floating point format fully supported by the hardware. Since the ia32 hardware supports 80-bit floating-point, but the SPARC hardware only supports 64-bit hardware, the RM *requires* that the two implementations are different in this respect. Are you really saying that Rational does not follow this requirement? That would be rather surprising, this is not an optional requirement, since this part of annex B is required to be implemented in any conforming compiler. In GNAT, the relevant declarations are: -- Floating point types. We assume that we are on an -- IEEE machine, and that the types Short_Float and -- Long_Float in Standard refer to the -- 32-bit short and 64-bit long IEEE forms. -- Furthermore, if there is -- an extended float, we assume that it is available as -- Long_Long_Float. -- Note: it is harmless, and explicitly permitted, to -- include additional -- types in interfaces, so it is not wrong to have -- IEEE_Extended_Float -- defined even if the extended format is not -- available. type IEEE_Float_32 is new Short_Float; type IEEE_Float_64 is new Long_Float; type IEEE_Extended_Float is new Long_Long_Float; The decision to provide the type Long_Long_Float in Standard is of course NOT required, and is a (permissible, and we think desirable) implementation choice. However, providing full support of the 80-bit form in Interfaces is clearly required by the RM, and indeed was quite deliberate. During the design, we felt it was important to ensure support for all available hardware floating-point formats. Robert Dewar Ada Core Technologies -----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own