pgsql: Use an unsigned char for bool if we don't use the native bool.

From: Andrew Gierth <rhodiumtoad(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Use an unsigned char for bool if we don't use the native bool.
Date: 2019-02-20 22:01:47
Message-ID: E1gwZw3-0001XU-2c@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Use an unsigned char for bool if we don't use the native bool.

On (rare) platforms where sizeof(bool) > 1, we need to use our own
bool, but imported c99 code (such as Ryu) may want to use bool values
as array subscripts, which elicits warnings if bool is defined as
char. Using unsigned char instead should work just as well for our
purposes, and avoid such warnings.

Per buildfarm members prariedog and locust.

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/d26a810ebf9e419556a60bdc0a4190883c38f4c4

Modified Files
--------------
src/include/c.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2019-02-21 01:53:25 pgsql: Speed up match_eclasses_to_foreign_key_col() when there are many
Previous Message Tom Lane 2019-02-20 19:39:17 pgsql: Improve planner's understanding of strictness of type coercions.