Re: GinPageIs* don't actually return a boolean

Поиск
Список
Период
Сортировка
От Dmitry Ivanov
Тема Re: GinPageIs* don't actually return a boolean
Дата
Msg-id 1745981.L5LNPAf4LD@abook
обсуждение исходный текст
Ответ на Re: GinPageIs* don't actually return a boolean  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
> OK, that seems reasonable from here.  What I'm still fuzzy about is
> why including stdbool.h causes a failure. Is it because it defines a
> type called "bool" that clashes with ours?  That seems like the
> obvious explanation, but then how does that not cause the compiler to
> just straight-up error out?

stdbool.h defines the '_Bool' type. The standard says:

C99 and C11 §6.3.1.2/1 “When any scalar value is converted to _Bool, the
result is 0 if the value compares equal to 0; otherwise, the result is 1.”

It seems that MSVC's bool (_Bool) assignment complies to the standard.

--
Dmitry Ivanov
Postgres Professional: http://www.postgrespro.com
Russian Postgres Company



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

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: Re: BUG #13685: Archiving while idle every archive_timeout with wal_level hot_standby
Следующее
От: Andres Freund
Дата:
Сообщение: Re: GinPageIs* don't actually return a boolean