Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 5 Apr 2002 22:13:08 +0200
From:      Bernd Walter <ticso@cicely8.cicely.de>
To:        Jason Borkowsky <jcborkow@tcpns.com>
Cc:        freebsd-hackers@FreeBSD.ORG
Subject:   Re: 64-bit compiling on a 32-bit FreeBSD machine
Message-ID:  <20020405201307.GT51284@cicely8.cicely.de>
In-Reply-To: <Pine.BSF.4.44.0204051413580.64242-100000@bemused.tcpns.com>
References:  <Pine.BSF.4.44.0204051413580.64242-100000@bemused.tcpns.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Apr 05, 2002 at 02:36:41PM -0500, Jason Borkowsky wrote:
> 
> I have a FreeBSD 4.5-RELEASE box that I recently installed gcc-3.0.4. Is
> there any support for compiling 64-bit source code on this 32-bit set-up?
> (ie, a sort of emulation mode in that if the compiler sees a "long long
> int", it creates 2 32-bit registers for it instead of a 64-bit register).
> Currently gcc-3.0.4 understands "long long int", but if you try to assign
> it a 64-bit value, it just gets set to the largest 32-bit value (4 billion).
> If gcc cannot handle this, are there any other compilers that can made
> 64-bit code work on a 32-bit machine?

Numeric constants are int by default.
Add LL directly after the number to make them long long.

E.g.:
long long x;
x = 332478632478624LL;

-- 
B.Walter              COSMO-Project         http://www.cosmo-project.de
ticso@cicely.de         Usergroup           info@cosmo-project.de


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020405201307.GT51284>