Re: Any free compilers for 64-bit integer arithmetics?

Robert A Duff <bobduff@shell01.TheWorld.com>
Sun, 25 Sep 2011 17:31:16 -0400

          From comp.compilers

Related articles
Any free compilers for 64-bit integer arithmetics? mok-kong.shen@t-online.de (Mok-Kong Shen) (2011-09-20)
Re: Any free compilers for 64-bit integer arithmetics? gah@ugcs.caltech.edu (glen herrmannsfeldt) (2011-09-21)
Re: Any free compilers for 64-bit integer arithmetics? bobduff@shell01.TheWorld.com (Robert A Duff) (2011-09-22)
Re: Any free compilers for 64-bit integer arithmetics? mok-kong.shen@t-online.de (Mok-Kong Shen) (2011-09-24)
Re: Any free compilers for 64-bit integer arithmetics? bobduff@shell01.TheWorld.com (Robert A Duff) (2011-09-25)
| List of all articles for this month |
From: Robert A Duff <bobduff@shell01.TheWorld.com>
Newsgroups: comp.compilers
Date: Sun, 25 Sep 2011 17:31:16 -0400
Organization: The World Public Access UNIX, Brookline, MA
References: 11-09-024 11-09-026 11-09-030
Keywords: arithmetic
Posted-Date: 26 Sep 2011 15:29:44 EDT

Mok-Kong Shen <mok-kong.shen@t-online.de> writes:


> Am 22.09.2011 16:34, schrieb Robert A Duff:
>
>> All versions of GNAT support 64-bit arithmetic (signed and unsigned),
>> whether or not the hardware directly supports it.
>
> Thank you very much for the advice.


You're welcome.


>...I have just installed the software
> and I'll start to use it and learn thereby ADA programming which I have
> postponed due to laziness up till now. I am very happy to know also
> that it has support for C so that some of my C codes would be reusable.


Right. GNAT is part of gcc (the Ada part). gcc also compiles C, C++,
and several other languages. I suspect it supports 64-bit arithmetic
for all languages, but I'm not sure.


You can buy support for gcc Ada (and C, etc) from AdaCore,
which is my employer. Or you can use the free software version,
if you're a hobbyist who doesn't need support.


If you are interested in mixing Ada and C in the same program, you
should look at the section "Generating Ada Bindings for C and C++
headers" in the documentation. There is also support for mixing Ada and
C++, with cross-language method overriding.


> Besides it happens to be my luck that the software is a major new
> version released only a few months ago.
>
> Out of curiosity I have a tiny question: Does the software somehow
> finds out during installation whether the architecture on which it is
> installed is 32-bit or 64-bit and correspondingly chooses the most
> efficient way for machine code generation?


No. If you install a binary package, you have to pick one, which is
specific to some hardware and some operating system. If you pick the
linux x86-64 version, for example, it will generate 64-bit code, which
will work only on x86-64 linux. If you pick the linux x86 version, it
will generate 32-bit code, which will work on both 32-bit and 64-bit
hardware, on linux. And there are versions for windows and vxworks
(cross compiler) and SPARC and power PC and so forth.


If you build from sources, you can configure it for your system.
But it's pretty complicated.


- Bob


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.