[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Tinycc-devel] win32 port

From: Philippe Ribet
Subject: Re: [Tinycc-devel] win32 port
Date: Thu, 14 Oct 2004 11:24:24 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040413 Debian/1.6-5

TK wrote:

<         unsigned long long n, n1;
        uint64_t n, n1;

It's ok. BTW, Fabrice, if you're intrested, I can offer you macro which defines 
intxx_t types for compilers who don't defines it.

<         if ((n & 0xffffffff00000000LL) != 0) {
        if ((n & ((int64_t)0xffffffff00000000)) != 0) {

This code is wrong. You try to cast into int64_t in order to get some 64 bits 
value, this means you consider you have a 32 bits one. If the constant is 32 
bits, this means you lost half the bits and the cast won't recover them.

The good definition is: if ((n & INT64_C(0xffffffff00000000)) != 0) {

The definitions I proposed defines INTxx_C too for old compilers which use their own syntax.

   Best regards,

Philippe Ribet

                        The README file said
             "Requires Windows 95, NT 4.0, or better."
                   So... I installed it on Linux!

reply via email to

[Prev in Thread] Current Thread [Next in Thread]