diff --git a/src/test/modules/test_cplusplusext/test_cplusplusext.cpp b/src/test/modules/test_cplusplusext/test_cplusplusext.cpp index f1a2ab7f2bf..8c2eabcca43 100644 --- a/src/test/modules/test_cplusplusext/test_cplusplusext.cpp +++ b/src/test/modules/test_cplusplusext/test_cplusplusext.cpp @@ -25,6 +25,8 @@ PG_MODULE_MAGIC; PG_FUNCTION_INFO_V1(test_cplusplus_add); } +StaticAssertDecl(sizeof(int32) == 4, "int32 should be 4 bytes"); + /* * Simple function that returns the sum of two integers. This verifies that * C++ extension modules can be loaded and called correctly at runtime. @@ -47,6 +49,9 @@ test_cplusplus_add(PG_FUNCTION_ARGS) (void) rtr; } + StaticAssertStmt(sizeof(int32) == 4, "int32 should be 4 bytes"); + (void) StaticAssertExpr(sizeof(int64) == 8, "int64 should be 8 bytes"); + list_free(list); pfree(node);