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

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: AW: Re: RELEASE STOPPER? nonportable int64 constants in pg_crc.c
Дата
Msg-id 18114.985363939@sss.pgh.pa.us
обсуждение исходный текст
Ответ на AW: Re: RELEASE STOPPER? nonportable int64 constants in pg_crc.c  (Zeugswetter Andreas SB <ZeugswetterA@wien.spardat.at>)
Список pgsql-hackers
Zeugswetter Andreas SB  <ZeugswetterA@wien.spardat.at> writes:
>> I'm aware that some compilers will produce warnings about these
>> constants, but there should not be any that fail completely, since
>> (a) we won't be compiling this code unless we've proven that the
>> compiler supports a 64-bit-int datatype, and 

> Unfortunately configure does not check the use of 64 bit integer 
> constants. A little check on AIX shows, that it indeed DOES NOT work !!!!!

Grumble...

>> (b) the C standard
>> forbids a compiler from requiring width suffixes (cf. 6.4.4.1 in C99).

> Maybe that standard is somewhat too recent to rely upon 100%.

ANSI C says the same thing, although of course it only discusses int and
long.  But the spec has always been clear that the implied type of an
integer constant is whatever it takes to hold it; you do not need an
explicit "L" suffix to make a valid constant.  AIX's compiler is broken.

> Do you want me to supply an AIX specific patch with #if defined (_AIX) ?

I'll do something about it.  Would you check to see whether a macro like
#define SIXTYFOUR(x)  x##LL
works?
        regards, tom lane


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

Предыдущее
От: Zeugswetter Andreas SB
Дата:
Сообщение: AW: Re: RELEASE STOPPER? nonportable int64 constants in pg_crc.c
Следующее
От: Matthew
Дата:
Сообщение: 7.0.3 _bt_restscan: my bits moved right off the end of the world!