Refactor compile-time assertion checks in c.h
authorMichael Paquier <michael@paquier.xyz>
Fri, 13 Mar 2020 06:04:11 +0000 (15:04 +0900)
committerMichael Paquier <michael@paquier.xyz>
Fri, 13 Mar 2020 06:04:11 +0000 (15:04 +0900)
commitb7f64c64d3262c309e2c5e8c11fd111b1dbd1a4a
treedea82b98b8f78a87955348bfb59e79785055196f
parenta029a0641cce002acbb5e8ac6ec5533e599a9aea
Refactor compile-time assertion checks in c.h

This commit refactors and simplifies the definitions of StaticAssertStmt,
StaticAssertExpr and StaticAssertDecl.  By unifying the C and C++
fallback implementations, this reduces the number of different
implementations from four to three.

Author: Michael Paquier
Reviewed-by: Georgios Kokolatos, Tom Lane
Discussion: https://postgr.es/m/20200204081503.GF2287@paquier.xyz
src/include/c.h