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

Поиск
Список
Период
Сортировка
От Kris Jurka
Тема Re: pgsql-server: Fix TAS assembly stuff for Solaris/386.
Дата
Msg-id Pine.BSO.4.56.0409241120290.9037@leary.csoft.net
обсуждение исходный текст
Ответ на Re: pgsql-server: Fix TAS assembly stuff for Solaris/386.  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: pgsql-server: Fix TAS assembly stuff for Solaris/386.  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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 по дате отправления:

Предыдущее
От: "Marc G. Fournier"
Дата:
Сообщение: Re: pginstaller - CVSROOT: Update address for CVS
Следующее
От: Tom Lane
Дата:
Сообщение: Re: pgsql-server: Fix TAS assembly stuff for Solaris/386.