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

Commit8c8ee5c

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 parenta3b685f commit8c8ee5c

File tree

2 files changed

+73
-0
lines changed

2 files changed

+73
-0
lines changed

‎configure

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4641,6 +4641,72 @@ fi
46414641
if test -n "$NOT_THE_CFLAGS"; then
46424642
CFLAGS="$CFLAGS -Wno-compound-token-split-by-macro"
46434643
fi
4644+
# Similarly remove clang 15+'s deprecated-non-prototype, as it warns about
4645+
# tree-walking APIs that we can't reasonably change in the back branches.
4646+
NOT_THE_CFLAGS=""
4647+
{ $as_echo "$as_me:$LINENO: checking whether $CC supports -Wdeprecated-non-prototype" >&5
4648+
$as_echo_n "checking whether $CC supports -Wdeprecated-non-prototype... " >&6; }
4649+
if test "${pgac_cv_prog_cc_cflags__Wdeprecated_non_prototype+set}" = set; then
4650+
$as_echo_n "(cached) " >&6
4651+
else
4652+
pgac_save_CFLAGS=$CFLAGS
4653+
CFLAGS="$pgac_save_CFLAGS -Wdeprecated-non-prototype"
4654+
ac_save_c_werror_flag=$ac_c_werror_flag
4655+
ac_c_werror_flag=yes
4656+
cat >conftest.$ac_ext <<_ACEOF
4657+
/* confdefs.h. */
4658+
_ACEOF
4659+
cat confdefs.h >>conftest.$ac_ext
4660+
cat >>conftest.$ac_ext <<_ACEOF
4661+
/* end confdefs.h. */
4662+
4663+
int
4664+
main ()
4665+
{
4666+
4667+
;
4668+
return 0;
4669+
}
4670+
_ACEOF
4671+
rm -f conftest.$ac_objext
4672+
if { (ac_try="$ac_compile"
4673+
case "(($ac_try" in
4674+
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4675+
*) ac_try_echo=$ac_try;;
4676+
esac
4677+
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4678+
$as_echo "$ac_try_echo") >&5
4679+
(eval "$ac_compile") 2>conftest.er1
4680+
ac_status=$?
4681+
grep -v '^ *+' conftest.er1 >conftest.err
4682+
rm -f conftest.er1
4683+
cat conftest.err >&5
4684+
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4685+
(exit $ac_status); } && {
4686+
test -z "$ac_c_werror_flag" ||
4687+
test ! -s conftest.err
4688+
} && test -s conftest.$ac_objext; then
4689+
pgac_cv_prog_cc_cflags__Wdeprecated_non_prototype=yes
4690+
else
4691+
$as_echo "$as_me: failed program was:" >&5
4692+
sed 's/^/| /' conftest.$ac_ext >&5
4693+
4694+
pgac_cv_prog_cc_cflags__Wdeprecated_non_prototype=no
4695+
fi
4696+
4697+
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4698+
ac_c_werror_flag=$ac_save_c_werror_flag
4699+
CFLAGS="$pgac_save_CFLAGS"
4700+
fi
4701+
{ $as_echo "$as_me:$LINENO: result: $pgac_cv_prog_cc_cflags__Wdeprecated_non_prototype" >&5
4702+
$as_echo "$pgac_cv_prog_cc_cflags__Wdeprecated_non_prototype" >&6; }
4703+
if test x"$pgac_cv_prog_cc_cflags__Wdeprecated_non_prototype" = x"yes"; then
4704+
NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wdeprecated-non-prototype"
4705+
fi
4706+
4707+
if test -n "$NOT_THE_CFLAGS"; then
4708+
CFLAGS="$CFLAGS -Wno-deprecated-non-prototype"
4709+
fi
46444710
# Similarly disable useless truncation warnings from gcc 8+
46454711
NOT_THE_CFLAGS=""
46464712
{ $as_echo "$as_me:$LINENO: checking whether $CC supports -Wformat-truncation" >&5

‎configure.in

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -443,6 +443,13 @@ if test "$GCC" = yes -a "$ICC" = no; then
443443
if test -n "$NOT_THE_CFLAGS"; then
444444
CFLAGS="$CFLAGS -Wno-compound-token-split-by-macro"
445445
fi
446+
# Similarly remove clang 15+'s deprecated-non-prototype, as it warns about
447+
# tree-walking APIs that we can't reasonably change in the back branches.
448+
NOT_THE_CFLAGS=""
449+
PGAC_PROG_CC_VAR_OPT(NOT_THE_CFLAGS, [-Wdeprecated-non-prototype])
450+
if test -n "$NOT_THE_CFLAGS"; then
451+
CFLAGS="$CFLAGS -Wno-deprecated-non-prototype"
452+
fi
446453
# Similarly disable useless truncation warnings from gcc 8+
447454
NOT_THE_CFLAGS=""
448455
PGAC_PROG_CC_VAR_OPT(NOT_THE_CFLAGS, [-Wformat-truncation])

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp