[dmd-internals] OSX 64 bit

Walter Bright walter at digitalmars.com
Wed Nov 30 14:18:52 PST 2011



On 11/30/2011 1:30 AM, Don Clugston wrote:
> On 30 November 2011 09:27, Walter Bright<walter at digitalmars.com>  wrote:
>> The compiler is passing the test suite now, the only failure is in the unit
>> tests of std.bigint. Anyhow, any brave souls who want to try it out should
>> have a go!
> If anyone tries it, please help me fix the bigint failure by telling
> me the result of:

osx ~/cbx/mars> cat foo.d
import std.bigint;
import std.stdio;

string toHex(BigInt x)
{
     string outbuff="";
     void sink(const(char)[] s) { outbuff ~= s; }
     x.toString(&sink, "%x");
     return outbuff;
}

void main()
{
    writeln(toHex(BigInt("0x1234567890123456789")));
}

osx ~/cbx/mars> ./dmd foo -m32
osx ~/cbx/mars> ./foo
123_45678901_23456789
osx ~/cbx/mars> ./dmd foo -m64
osx ~/cbx/mars> ./foo
44444567_89ABCD45_6789ABCD
osx ~/cbx/mars>



More information about the dmd-internals mailing list