aboutsummaryrefslogtreecommitdiff
path: root/src/backend/parser/parse_expr.c
diff options
context:
space:
mode:
authorAndres Freund <andres@anarazel.de>2016-03-27 16:59:58 +0200
committerAndres Freund <andres@anarazel.de>2016-03-27 17:46:48 +0200
commitaf4472bcb88ab36b9abbe7fd5858e570a65a2d1a (patch)
tree58b43403fe98ccc6cdbd38c168538f1742349668 /src/backend/parser/parse_expr.c
parent29b6123ecb4113e366325245cec5a5c221dae691 (diff)
downloadpostgresql-af4472bcb88ab36b9abbe7fd5858e570a65a2d1a.tar.gz
postgresql-af4472bcb88ab36b9abbe7fd5858e570a65a2d1a.zip
Change various Gin*Is* macros to return 0/1.
Returning the direct result of bit arithmetic, in a macro intended to be used in a boolean manner, can be problematic if the return value is stored in a variable of type 'bool'. If bool is implemented using C99's _Bool, that can lead to comparison failures if the variable is then compared again with the expression (see ginStepRight() for an example that fails), as _Bool forces the result to be 0/1. That happens in some configurations of newer MSVC compilers. It's also problematic when storing the result of such an expression in a narrower type. Several gin macros have been declared in that style since gin's initial commit in 8a3631f8d86. There's a lot more macros like this, but this is the only one causing regression test failures; and I don't want to commit and backpatch a larger patch with lots of conflicts just before the next set of minor releases. Discussion: 20150811154237.GD17575@awork2.anarazel.de Backpatch: All supported branches
Diffstat (limited to 'src/backend/parser/parse_expr.c')
0 files changed, 0 insertions, 0 deletions