From: Peter Eisentraut Date: Mon, 23 Feb 2026 06:37:50 +0000 (+0100) Subject: test_cplusplusext: Add C++ pg_fallthrough test case X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2f2c9d836373ed7f4c017a9d953264f33cc03e3e;p=thirdparty%2Fpostgresql.git test_cplusplusext: Add C++ pg_fallthrough test case Discussion: https://www.postgresql.org/message-id/flat/76a8efcd-925a-4eaf-bdd1-d972cd1a32ff%40eisentraut.org --- diff --git a/src/test/modules/test_cplusplusext/test_cplusplusext.cpp b/src/test/modules/test_cplusplusext/test_cplusplusext.cpp index 8c2eabcca43..eb129dd15d4 100644 --- a/src/test/modules/test_cplusplusext/test_cplusplusext.cpp +++ b/src/test/modules/test_cplusplusext/test_cplusplusext.cpp @@ -55,5 +55,15 @@ test_cplusplus_add(PG_FUNCTION_ARGS) list_free(list); pfree(node); + switch (a) + { + case 1: + elog(DEBUG1, "1"); + pg_fallthrough; + case 2: + elog(DEBUG1, "2"); + break; + } + PG_RETURN_INT32(a + b); }