Re: taking stdbool.h into use
Alvaro Herrera <alvherre@alvh.no-ip.org>
From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>, Thomas Munro <thomas.munro@enterprisedb.com>
Date: 2017-10-26T17:51:08Z
Lists: pgsql-hackers
Peter Eisentraut wrote: > Here is an updated patch set. This is just a rebase of the previous > set, no substantial changes. Based on the discussion so far, I'm > proposing that 0001 through 0007 could be ready to commit after review, > whereas the remaining two need more work at some later time. I gave this a quick run, to see if my compiler would complain for things like this: bool isprimary = flags & INDEX_CREATE_IS_PRIMARY; (taken from the first patch at https://postgr.es/m/20171023161503.ohkybquxrlech7d7@alvherre.pgsql ) which is assigning a value other than 1/0 to a bool variable without an explicit cast. I thought it would provoke a warning, but it does not. Is that expected? Is my compiler too old/new? config.log says gcc version 6.3.0 20170516 (Debian 6.3.0-18) -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
Commits
-
Use stdbool.h if suitable
- 9a95a77d9d5d 11.0 landed
-
Add configure tests for stdbool.h and sizeof bool
- f20b3285340c 11.0 landed
-
Remove useless use of bit-masking macros
- d91da5ecedc8 11.0 landed
-
Change various Gin*Is* macros to return 0/1.
- af4472bcb88a 9.6.0 cited
-
Fix several possibly non-portable gaffs in record_image_ops.
- 4cbb646334b3 9.4.0 cited