Add declaration-level assertions for compile-time checks
authorMichael Paquier <michael@paquier.xyz>
Mon, 3 Feb 2020 05:48:42 +0000 (14:48 +0900)
committerMichael Paquier <michael@paquier.xyz>
Mon, 3 Feb 2020 05:48:42 +0000 (14:48 +0900)
commitf1f10a1ba9e17e606a7b217ccccdd3cc4d8cb771
tree2ad0e6861232bcef32bc0924469de3958b86cdb4
parent6148e2b9a6399b77e10e277c32d701b84703820f
Add declaration-level assertions for compile-time checks

Those new assertions can be used at file scope, outside of any function
for compilation checks.  This commit provides implementations for C and
C++, and fallback implementations.

Author: Peter Smith
Reviewed-by: Andres Freund, Kyotaro Horiguchi, Dagfinn Ilmari MannsΓ₯ker,
Michael Paquier
Discussion: https://postgr.es/m/201DD0641B056142AC8C6645EC1B5F62014B8E8030@SYD1217
src/backend/storage/page/bufpage.c
src/backend/utils/adt/lockfuncs.c
src/backend/utils/misc/guc.c
src/bin/pg_dump/pg_dump_sort.c
src/common/relpath.c
src/include/c.h
src/include/storage/bufpage.h