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

Commit52a5fd5

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 parentf38a0bd commit52a5fd5

File tree

2 files changed

+99
-0
lines changed

2 files changed

+99
-0
lines changed

‎configure

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6084,6 +6084,51 @@ fi
60846084
if test -n "$NOT_THE_CFLAGS"; then
60856085
CFLAGS="$CFLAGS -Wno-compound-token-split-by-macro"
60866086
fi
6087+
# Similarly remove clang 15+'s deprecated-non-prototype, as it warns about
6088+
# tree-walking APIs that we can't reasonably change in the back branches.
6089+
NOT_THE_CFLAGS=""
6090+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wdeprecated-non-prototype, for NOT_THE_CFLAGS" >&5
6091+
$as_echo_n "checking whether ${CC} supports -Wdeprecated-non-prototype, for NOT_THE_CFLAGS... " >&6; }
6092+
if ${pgac_cv_prog_CC_cflags__Wdeprecated_non_prototype+:} false; then :
6093+
$as_echo_n "(cached) " >&6
6094+
else
6095+
pgac_save_CFLAGS=$CFLAGS
6096+
pgac_save_CC=$CC
6097+
CC=${CC}
6098+
CFLAGS="${NOT_THE_CFLAGS} -Wdeprecated-non-prototype"
6099+
ac_save_c_werror_flag=$ac_c_werror_flag
6100+
ac_c_werror_flag=yes
6101+
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6102+
/* end confdefs.h. */
6103+
6104+
int
6105+
main ()
6106+
{
6107+
6108+
;
6109+
return 0;
6110+
}
6111+
_ACEOF
6112+
if ac_fn_c_try_compile "$LINENO"; then :
6113+
pgac_cv_prog_CC_cflags__Wdeprecated_non_prototype=yes
6114+
else
6115+
pgac_cv_prog_CC_cflags__Wdeprecated_non_prototype=no
6116+
fi
6117+
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6118+
ac_c_werror_flag=$ac_save_c_werror_flag
6119+
CFLAGS="$pgac_save_CFLAGS"
6120+
CC="$pgac_save_CC"
6121+
fi
6122+
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wdeprecated_non_prototype" >&5
6123+
$as_echo "$pgac_cv_prog_CC_cflags__Wdeprecated_non_prototype" >&6; }
6124+
if test x"$pgac_cv_prog_CC_cflags__Wdeprecated_non_prototype" = x"yes"; then
6125+
NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wdeprecated-non-prototype"
6126+
fi
6127+
6128+
6129+
if test -n "$NOT_THE_CFLAGS"; then
6130+
CFLAGS="$CFLAGS -Wno-deprecated-non-prototype"
6131+
fi
60876132
# Similarly disable useless truncation warnings from gcc 8+
60886133
NOT_THE_CFLAGS=""
60896134
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wformat-truncation, for NOT_THE_CFLAGS" >&5
@@ -6998,6 +7043,48 @@ fi
69987043
BITCODE_CFLAGS="$BITCODE_CFLAGS -Wno-compound-token-split-by-macro"
69997044
fi
70007045
NOT_THE_CFLAGS=""
7046+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -Wdeprecated-non-prototype, for NOT_THE_CFLAGS" >&5
7047+
$as_echo_n "checking whether ${CLANG} supports -Wdeprecated-non-prototype, for NOT_THE_CFLAGS... " >&6; }
7048+
if ${pgac_cv_prog_CLANG_cflags__Wdeprecated_non_prototype+:} false; then :
7049+
$as_echo_n "(cached) " >&6
7050+
else
7051+
pgac_save_CFLAGS=$CFLAGS
7052+
pgac_save_CC=$CC
7053+
CC=${CLANG}
7054+
CFLAGS="${NOT_THE_CFLAGS} -Wdeprecated-non-prototype"
7055+
ac_save_c_werror_flag=$ac_c_werror_flag
7056+
ac_c_werror_flag=yes
7057+
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7058+
/* end confdefs.h. */
7059+
7060+
int
7061+
main ()
7062+
{
7063+
7064+
;
7065+
return 0;
7066+
}
7067+
_ACEOF
7068+
if ac_fn_c_try_compile "$LINENO"; then :
7069+
pgac_cv_prog_CLANG_cflags__Wdeprecated_non_prototype=yes
7070+
else
7071+
pgac_cv_prog_CLANG_cflags__Wdeprecated_non_prototype=no
7072+
fi
7073+
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7074+
ac_c_werror_flag=$ac_save_c_werror_flag
7075+
CFLAGS="$pgac_save_CFLAGS"
7076+
CC="$pgac_save_CC"
7077+
fi
7078+
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__Wdeprecated_non_prototype" >&5
7079+
$as_echo "$pgac_cv_prog_CLANG_cflags__Wdeprecated_non_prototype" >&6; }
7080+
if test x"$pgac_cv_prog_CLANG_cflags__Wdeprecated_non_prototype" = x"yes"; then
7081+
NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wdeprecated-non-prototype"
7082+
fi
7083+
7084+
if test -n "$NOT_THE_CFLAGS"; then
7085+
BITCODE_CFLAGS="$BITCODE_CFLAGS -Wno-deprecated-non-prototype"
7086+
fi
7087+
NOT_THE_CFLAGS=""
70017088
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -Wformat-truncation, for NOT_THE_CFLAGS" >&5
70027089
$as_echo_n "checking whether ${CLANG} supports -Wformat-truncation, for NOT_THE_CFLAGS... " >&6; }
70037090
if ${pgac_cv_prog_CLANG_cflags__Wformat_truncation+:} false; then :

‎configure.in

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -527,6 +527,13 @@ if test "$GCC" = yes -a "$ICC" = no; then
527527
if test -n "$NOT_THE_CFLAGS"; then
528528
CFLAGS="$CFLAGS -Wno-compound-token-split-by-macro"
529529
fi
530+
# Similarly remove clang 15+'s deprecated-non-prototype, as it warns about
531+
# tree-walking APIs that we can't reasonably change in the back branches.
532+
NOT_THE_CFLAGS=""
533+
PGAC_PROG_CC_VAR_OPT(NOT_THE_CFLAGS, [-Wdeprecated-non-prototype])
534+
if test -n "$NOT_THE_CFLAGS"; then
535+
CFLAGS="$CFLAGS -Wno-deprecated-non-prototype"
536+
fi
530537
# Similarly disable useless truncation warnings from gcc 8+
531538
NOT_THE_CFLAGS=""
532539
PGAC_PROG_CC_VAR_OPT(NOT_THE_CFLAGS, [-Wformat-truncation])
@@ -588,6 +595,11 @@ if test "$with_llvm" = yes ; then
588595
BITCODE_CFLAGS="$BITCODE_CFLAGS -Wno-compound-token-split-by-macro"
589596
fi
590597
NOT_THE_CFLAGS=""
598+
PGAC_PROG_VARCC_VARFLAGS_OPT(CLANG, NOT_THE_CFLAGS, [-Wdeprecated-non-prototype])
599+
if test -n "$NOT_THE_CFLAGS"; then
600+
BITCODE_CFLAGS="$BITCODE_CFLAGS -Wno-deprecated-non-prototype"
601+
fi
602+
NOT_THE_CFLAGS=""
591603
PGAC_PROG_VARCC_VARFLAGS_OPT(CLANG, NOT_THE_CFLAGS, [-Wformat-truncation])
592604
if test -n "$NOT_THE_CFLAGS"; then
593605
BITCODE_CFLAGS="$BITCODE_CFLAGS -Wno-format-truncation"

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp