Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitca8fd34

Browse files
committed
Disable -Wdeprecated-non-prototype in the back branches.
There doesn't seem to be any good ABI-preserving way to silenceclang 15's -Wdeprecated-non-prototype warnings about our tree-walkAPIs. While we've fixed it properly in HEAD, the only way to notsee hundreds of these in the back branches is to disable thewarnings. We're not going to do anything about them, so we mightas well disable them.I noticed that we also get some of these warnings about fmgr.c'ssupport for V0 function call convention, in branches before v10where we removed that. That's another area we aren't going tochange, so turning off the warning seems fine for that too.Per project policy, this is a candidate for back-patching intoout-of-support branches: it suppresses annoying compiler warningsbut changes no behavior. Hence, back-patch all the way to 9.2.Discussion:https://postgr.es/m/CA+hUKGKpHPDTv67Y+s6yiC8KH5OXeDg6a-twWo_xznKTcG0kSA@mail.gmail.com
1 parent85c077f commitca8fd34

File tree

2 files changed

+48
-0
lines changed

2 files changed

+48
-0
lines changed

‎configure

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4832,6 +4832,47 @@ fi
48324832
iftest -n"$NOT_THE_CFLAGS";then
48334833
CFLAGS="$CFLAGS -Wno-compound-token-split-by-macro"
48344834
fi
4835+
# Similarly remove clang 15+'s deprecated-non-prototype, as it warns about
4836+
# tree-walking APIs that we can't reasonably change in the back branches.
4837+
NOT_THE_CFLAGS=""
4838+
{$as_echo"$as_me:${as_lineno-$LINENO}: checking whether$CC supports -Wdeprecated-non-prototype">&5
4839+
$as_echo_n"checking whether$CC supports -Wdeprecated-non-prototype...">&6; }
4840+
if${pgac_cv_prog_cc_cflags__Wdeprecated_non_prototype+:}false;then:
4841+
$as_echo_n"(cached)">&6
4842+
else
4843+
pgac_save_CFLAGS=$CFLAGS
4844+
CFLAGS="$pgac_save_CFLAGS -Wdeprecated-non-prototype"
4845+
ac_save_c_werror_flag=$ac_c_werror_flag
4846+
ac_c_werror_flag=yes
4847+
cat confdefs.h -<<_ACEOF >conftest.$ac_ext
4848+
/* end confdefs.h. */
4849+
4850+
int
4851+
main ()
4852+
{
4853+
4854+
;
4855+
return 0;
4856+
}
4857+
_ACEOF
4858+
if ac_fn_c_try_compile"$LINENO";then:
4859+
pgac_cv_prog_cc_cflags__Wdeprecated_non_prototype=yes
4860+
else
4861+
pgac_cv_prog_cc_cflags__Wdeprecated_non_prototype=no
4862+
fi
4863+
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4864+
ac_c_werror_flag=$ac_save_c_werror_flag
4865+
CFLAGS="$pgac_save_CFLAGS"
4866+
fi
4867+
{$as_echo"$as_me:${as_lineno-$LINENO}: result:$pgac_cv_prog_cc_cflags__Wdeprecated_non_prototype">&5
4868+
$as_echo"$pgac_cv_prog_cc_cflags__Wdeprecated_non_prototype">&6; }
4869+
iftest x"$pgac_cv_prog_cc_cflags__Wdeprecated_non_prototype" = x"yes";then
4870+
NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wdeprecated-non-prototype"
4871+
fi
4872+
4873+
iftest -n"$NOT_THE_CFLAGS";then
4874+
CFLAGS="$CFLAGS -Wno-deprecated-non-prototype"
4875+
fi
48354876
# Similarly disable useless truncation warnings from gcc 8+
48364877
NOT_THE_CFLAGS=""
48374878
{$as_echo"$as_me:${as_lineno-$LINENO}: checking whether$CC supports -Wformat-truncation">&5

‎configure.in

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -472,6 +472,13 @@ if test "$GCC" = yes -a "$ICC" = no; then
472472
if test -n "$NOT_THE_CFLAGS"; then
473473
CFLAGS="$CFLAGS -Wno-compound-token-split-by-macro"
474474
fi
475+
# Similarly remove clang 15+'s deprecated-non-prototype, as it warns about
476+
# tree-walking APIs that we can't reasonably change in the back branches.
477+
NOT_THE_CFLAGS=""
478+
PGAC_PROG_CC_VAR_OPT(NOT_THE_CFLAGS, [-Wdeprecated-non-prototype])
479+
if test -n "$NOT_THE_CFLAGS"; then
480+
CFLAGS="$CFLAGS -Wno-deprecated-non-prototype"
481+
fi
475482
# Similarly disable useless truncation warnings from gcc 8+
476483
NOT_THE_CFLAGS=""
477484
PGAC_PROG_CC_VAR_OPT(NOT_THE_CFLAGS, [-Wformat-truncation])

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp