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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,bd3300f3a56e7f45 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2004-03-18 06:18:52 PST Path: archiver1.google.com!news1.google.com!news.glorb.com!newsfeed.kabelfoon.nl!195.129.110.21.MISMATCH!bnewsfeed00.bru.ops.eu.uu.net!bnewsinpeer00.bru.ops.eu.uu.net!emea.uu.net!tiscali!newsfeed1.ip.tiscali.net!news.worldonline.be!not-for-mail From: Ludovic Brenta Newsgroups: comp.lang.ada Subject: Re: different compilers: different standard types????? Date: 18 Mar 2004 15:21:46 +0100 Organization: Worldonline Belgium Sender: lbrenta@deuteronomy Message-ID: <87hdwmnslh.fsf@insalien.org> References: NNTP-Posting-Host: ppp-62-235-74-137.tiscali.be Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: news.worldonline.be 1079619531 20177 62.235.74.137 (18 Mar 2004 14:18:51 GMT) X-Complaints-To: abuse@worldonline.be NNTP-Posting-Date: Thu, 18 Mar 2004 14:18:51 +0000 (UTC) User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 Xref: archiver1.google.com comp.lang.ada:6404 Date: 2004-03-18T15:21:46+01:00 List-Id: Marius Amado Alves writes: > I have a related problem, at least with GNAT 3.15p, the compiler of > all us poor academics. > > The standard requires that "the range of Integer should be no wider > than that of Long_Integer" 3.5.4 (25). (I'm not sure this is an > intelligent limitation, but never mind.) Basically, this means that by definition, Long_Integer is at least as long as Integer. It's not really a limitation, but a definition of terms. > GNAT defines Integer and Long_Integer for 32-bit, and > Long_Long_Integer for 64-bit. > > So if you want to define an integral type with a greater range than > (the associated with) 32 bits, you have to use Long_Long_Integer as > a base. But then you hinder portability, because Long_Long_Integer > is not standard. > > So I guess my question is: Why does not GNAT define Integer (and > Long_Integer) for 64-bits? AFAICS the standard does not impose a > upper limit on Integer. And don't tell me the answer is: Because > then Short_Integer would have 32-bits, and that is not what the C > world calls short. It's not because of C, it's because in your case, GNAT targets a 32-bit processor. This means that, if you recompile GNAT to target a 64-bit machine, Integer and Long_Integer should become 64 bits wide. You may also want to try -gnatdm, debug.adb says this forces Long_Integer to be 64 bits wide on all targets, but it also warns that this flag may cause other problems. -- Ludovic Brenta.