Re: pgsql-server: Fix TAS assembly stuff for Solaris/386. - Mailing list pgsql-committers

From Kris Jurka
Subject Re: pgsql-server: Fix TAS assembly stuff for Solaris/386.
Date
Msg-id Pine.BSO.4.56.0409241120290.9037@leary.csoft.net
Whole thread Raw
In response to Re: pgsql-server: Fix TAS assembly stuff for Solaris/386.  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: pgsql-server: Fix TAS assembly stuff for Solaris/386.
List pgsql-committers

On Fri, 24 Sep 2004, Tom Lane wrote:

> Kris Jurka <books@ejurka.com> writes:
> > UINT64CONST produces these in a number of places:
> > "xlog.c", line 552: warning: constant promoted to unsigned long long
>
> > it likes either ##ULL or unadorned.  The problem is we're taking a
> > constant larger than long long and explicitly saying it's a long long.
>
> No other machine we use thinks it's larger than long long --- are you
> sure about that?  If that is the problem, why does the message use the
> word "promoted" and not, say, "truncated"?

Well, it's not really truncated it just overflows long long.

Looking at the following code, the warning is only produced for the c2
constant.

#define ULL(x) (x##ULL)
#define LL(x) (x##LL)

void f() {
        unsigned long long c1 = ULL(0xFFFFFFFFFFFFFFFF);
        unsigned long long c2 = LL(0xFFFFFFFFFFFFFFFF);
        unsigned long long c3 = 0xFFFFFFFFFFFFFFFF;
        unsigned long long c4 = ULL(0x1111111111111111);
        unsigned long long c5 = LL(0x1111111111111111);
        unsigned long long c6 = 0x1111111111111111;
}



pgsql-committers by date:

Previous
From: "Marc G. Fournier"
Date:
Subject: Re: pginstaller - CVSROOT: Update address for CVS
Next
From: Tom Lane
Date:
Subject: Re: pgsql-server: Fix TAS assembly stuff for Solaris/386.