Re: RELEASE STOPPER? nonportable int64 constants in pg_crc.c

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: RELEASE STOPPER? nonportable int64 constants in pg_crc.c
Дата
Msg-id Pine.LNX.4.30.0103221736370.1208-100000@peter.localdomain
обсуждение исходный текст
Ответ на Re: RELEASE STOPPER? nonportable int64 constants in pg_crc.c  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: RELEASE STOPPER? nonportable int64 constants in pg_crc.c  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Tom Lane writes:

> > #if <int64 == long>
> > #define L64 L
> > #else
> > #define L64 LL
> > #endif
>
> > const uint64 crc_table[256] = {
> >     0x0000000000000000##L64, 0x42F0E1EBA9EA3693##L64,
> >     0x85E1C3D753D46D26##L64, 0xC711223CFA3E5BB5##L64,
>
> Hmm ... how portable is that likely to be?

If the 'L' or 'LL' suffix is portable (probably), and token pasting is
portable (yes), then the aggregate should be as well, because one is
handled by the preprocessor and the other by the compiler.

> I don't want to suppress warnings on a few boxes at the cost of
> breaking even one platform that would otherwise work.  See my reply to
> Andreas.

It's possible that there might be one that warns and truncates, but that's
unlikely.  Why are there suffixes for integer (not float) constants
anyway?

-- 
Peter Eisentraut      peter_e@gmx.net       http://yi.org/peter-e/



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: Re: Call for platforms
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: odbc/UnixWare 7.1.1: No Go.