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

Commit1b69865

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 parent612e796 commit1b69865

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
@@ -4817,6 +4817,47 @@ fi
48174817
iftest -n"$NOT_THE_CFLAGS";then
48184818
CFLAGS="$CFLAGS -Wno-compound-token-split-by-macro"
48194819
fi
4820+
# Similarly remove clang 15+'s deprecated-non-prototype, as it warns about
4821+
# tree-walking APIs that we can't reasonably change in the back branches.
4822+
NOT_THE_CFLAGS=""
4823+
{$as_echo"$as_me:${as_lineno-$LINENO}: checking whether$CC supports -Wdeprecated-non-prototype">&5
4824+
$as_echo_n"checking whether$CC supports -Wdeprecated-non-prototype...">&6; }
4825+
if${pgac_cv_prog_cc_cflags__Wdeprecated_non_prototype+:}false;then:
4826+
$as_echo_n"(cached)">&6
4827+
else
4828+
pgac_save_CFLAGS=$CFLAGS
4829+
CFLAGS="$pgac_save_CFLAGS -Wdeprecated-non-prototype"
4830+
ac_save_c_werror_flag=$ac_c_werror_flag
4831+
ac_c_werror_flag=yes
4832+
cat confdefs.h -<<_ACEOF >conftest.$ac_ext
4833+
/* end confdefs.h. */
4834+
4835+
int
4836+
main ()
4837+
{
4838+
4839+
;
4840+
return 0;
4841+
}
4842+
_ACEOF
4843+
if ac_fn_c_try_compile"$LINENO";then:
4844+
pgac_cv_prog_cc_cflags__Wdeprecated_non_prototype=yes
4845+
else
4846+
pgac_cv_prog_cc_cflags__Wdeprecated_non_prototype=no
4847+
fi
4848+
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4849+
ac_c_werror_flag=$ac_save_c_werror_flag
4850+
CFLAGS="$pgac_save_CFLAGS"
4851+
fi
4852+
{$as_echo"$as_me:${as_lineno-$LINENO}: result:$pgac_cv_prog_cc_cflags__Wdeprecated_non_prototype">&5
4853+
$as_echo"$pgac_cv_prog_cc_cflags__Wdeprecated_non_prototype">&6; }
4854+
iftest x"$pgac_cv_prog_cc_cflags__Wdeprecated_non_prototype" = x"yes";then
4855+
NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wdeprecated-non-prototype"
4856+
fi
4857+
4858+
iftest -n"$NOT_THE_CFLAGS";then
4859+
CFLAGS="$CFLAGS -Wno-deprecated-non-prototype"
4860+
fi
48204861
# Similarly disable useless truncation warnings from gcc 8+
48214862
NOT_THE_CFLAGS=""
48224863
{$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
@@ -461,6 +461,13 @@ if test "$GCC" = yes -a "$ICC" = no; then
461461
if test -n "$NOT_THE_CFLAGS"; then
462462
CFLAGS="$CFLAGS -Wno-compound-token-split-by-macro"
463463
fi
464+
# Similarly remove clang 15+'s deprecated-non-prototype, as it warns about
465+
# tree-walking APIs that we can't reasonably change in the back branches.
466+
NOT_THE_CFLAGS=""
467+
PGAC_PROG_CC_VAR_OPT(NOT_THE_CFLAGS, [-Wdeprecated-non-prototype])
468+
if test -n "$NOT_THE_CFLAGS"; then
469+
CFLAGS="$CFLAGS -Wno-deprecated-non-prototype"
470+
fi
464471
# Similarly disable useless truncation warnings from gcc 8+
465472
NOT_THE_CFLAGS=""
466473
PGAC_PROG_CC_VAR_OPT(NOT_THE_CFLAGS, [-Wformat-truncation])

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp