Repository navigation
Conversation
GCC 15 compiles C as C23 by default. In C23, "void f()" means "void f(void)", and not an unspecified parameter list as before, so a function defined with empty parentheses no longer converts to a function pointer type that has parameters. Together with GCC 14 making -Wincompatible-pointer-types an error, "make unittest-check" fails on Ubuntu 26.04 in 9 test files: error: passing argument 5 of '_will_return' from incompatible pointer type [-Wincompatible-pointer-types] error: initialization of 'void (*)(void **)' from incompatible pointer type 'void (*)(void)' Give 11 functions the parameter list of the type they are used as: - 9 side effect callbacks passed to will_return_with_sideeffect() and will_be_called_with_sideeffect(), of type void (*)(void *): _ExceptionalCondition (6 files), _errfinish_impl (2 files) and RedZoneHandler_DetectRunawaySession_TrackedBytesSanity. None of them is called directly. The use of _ExceptionalCondition in vmem_tracker_test.c is inside #ifdef USE_ASSERT_CHECKING, so it is only compiled in a build with --enable-cassert. - 2 cmockery test functions in ginpostinglist_test.c, of type void (*)(void **). Checked on Ubuntu 26.04 (GCC 15.2) with "make -k unittest-check". With the CI configuration it had 21 errors in 9 files before, and now passes. With --enable-cassert it has no compile errors, and all unit tests pass. Assisted-by: Claude Code Backpatch-through: REL_2_STABLE
tuhaihe
enabled auto-merge (rebase)
October 10, 2026 05:43
Member
Author
|
This change has been verified in Ubuntu 26.04 on #2096 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
GCC 15 compiles C as C23 by default. In C23, "void f()" means
"void f(void)", and not an unspecified parameter list as before, so a
function defined with empty parentheses no longer converts to a
function pointer type that has parameters. Together with GCC 14 making
-Wincompatible-pointer-typesan error, "make unittest-check" fails onUbuntu 26.04 in 9 test files:
Give 11 functions the parameter list of the type they are used as:
will_be_called_with_sideeffect(), of type void (*)(void *):
_ExceptionalCondition (6 files), _errfinish_impl (2 files) and
RedZoneHandler_DetectRunawaySession_TrackedBytesSanity. None of them
is called directly. The use of _ExceptionalCondition in
vmem_tracker_test.c is inside #ifdef USE_ASSERT_CHECKING, so it is
only compiled in a build with --enable-cassert.
void (*)(void **).
Checked on Ubuntu 26.04 (GCC 15.2) with "make -k unittest-check". With
the CI configuration it had 21 errors in 9 files before, and now passes.
With --enable-cassert it has no compile errors, and all unit tests pass.
Assisted-by: Claude Code
Backpatch-through: REL_2_STABLE
Fixes #ISSUE_Number
What does this PR do?
Type of Change
Breaking Changes
Test Plan
make installcheckmake -C src/test installcheck-cbdb-parallelImpact
Performance:
User-facing changes:
Dependencies:
Checklist
Additional Context
CI Skip Instructions