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

Commit7d5d3f0

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 parentb53780e commit7d5d3f0

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
@@ -4787,6 +4787,47 @@ fi
47874787
iftest -n"$NOT_THE_CFLAGS";then
47884788
CFLAGS="$CFLAGS -Wno-compound-token-split-by-macro"
47894789
fi
4790+
# Similarly remove clang 15+'s deprecated-non-prototype, as it warns about
4791+
# tree-walking APIs that we can't reasonably change in the back branches.
4792+
NOT_THE_CFLAGS=""
4793+
{$as_echo"$as_me:${as_lineno-$LINENO}: checking whether$CC supports -Wdeprecated-non-prototype">&5
4794+
$as_echo_n"checking whether$CC supports -Wdeprecated-non-prototype...">&6; }
4795+
if${pgac_cv_prog_cc_cflags__Wdeprecated_non_prototype+:}false;then:
4796+
$as_echo_n"(cached)">&6
4797+
else
4798+
pgac_save_CFLAGS=$CFLAGS
4799+
CFLAGS="$pgac_save_CFLAGS -Wdeprecated-non-prototype"
4800+
ac_save_c_werror_flag=$ac_c_werror_flag
4801+
ac_c_werror_flag=yes
4802+
cat confdefs.h -<<_ACEOF >conftest.$ac_ext
4803+
/* end confdefs.h. */
4804+
4805+
int
4806+
main ()
4807+
{
4808+
4809+
;
4810+
return 0;
4811+
}
4812+
_ACEOF
4813+
if ac_fn_c_try_compile"$LINENO";then:
4814+
pgac_cv_prog_cc_cflags__Wdeprecated_non_prototype=yes
4815+
else
4816+
pgac_cv_prog_cc_cflags__Wdeprecated_non_prototype=no
4817+
fi
4818+
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4819+
ac_c_werror_flag=$ac_save_c_werror_flag
4820+
CFLAGS="$pgac_save_CFLAGS"
4821+
fi
4822+
{$as_echo"$as_me:${as_lineno-$LINENO}: result:$pgac_cv_prog_cc_cflags__Wdeprecated_non_prototype">&5
4823+
$as_echo"$pgac_cv_prog_cc_cflags__Wdeprecated_non_prototype">&6; }
4824+
iftest x"$pgac_cv_prog_cc_cflags__Wdeprecated_non_prototype" = x"yes";then
4825+
NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wdeprecated-non-prototype"
4826+
fi
4827+
4828+
iftest -n"$NOT_THE_CFLAGS";then
4829+
CFLAGS="$CFLAGS -Wno-deprecated-non-prototype"
4830+
fi
47904831
# Similarly disable useless truncation warnings from gcc 8+
47914832
NOT_THE_CFLAGS=""
47924833
{$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
@@ -456,6 +456,13 @@ if test "$GCC" = yes -a "$ICC" = no; then
456456
if test -n "$NOT_THE_CFLAGS"; then
457457
CFLAGS="$CFLAGS -Wno-compound-token-split-by-macro"
458458
fi
459+
# Similarly remove clang 15+'s deprecated-non-prototype, as it warns about
460+
# tree-walking APIs that we can't reasonably change in the back branches.
461+
NOT_THE_CFLAGS=""
462+
PGAC_PROG_CC_VAR_OPT(NOT_THE_CFLAGS, [-Wdeprecated-non-prototype])
463+
if test -n "$NOT_THE_CFLAGS"; then
464+
CFLAGS="$CFLAGS -Wno-deprecated-non-prototype"
465+
fi
459466
# Similarly disable useless truncation warnings from gcc 8+
460467
NOT_THE_CFLAGS=""
461468
PGAC_PROG_CC_VAR_OPT(NOT_THE_CFLAGS, [-Wformat-truncation])

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp