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

Commit43f72e0

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 parentca3b730 commit43f72e0

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
@@ -6186,6 +6186,51 @@ fi
61866186
if test -n "$NOT_THE_CFLAGS"; then
61876187
CFLAGS="$CFLAGS -Wno-compound-token-split-by-macro"
61886188
fi
6189+
# Similarly remove clang 15+'s deprecated-non-prototype, as it warns about
6190+
# tree-walking APIs that we can't reasonably change in the back branches.
6191+
NOT_THE_CFLAGS=""
6192+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wdeprecated-non-prototype, for NOT_THE_CFLAGS" >&5
6193+
$as_echo_n "checking whether ${CC} supports -Wdeprecated-non-prototype, for NOT_THE_CFLAGS... " >&6; }
6194+
if ${pgac_cv_prog_CC_cflags__Wdeprecated_non_prototype+:} false; then :
6195+
$as_echo_n "(cached) " >&6
6196+
else
6197+
pgac_save_CFLAGS=$CFLAGS
6198+
pgac_save_CC=$CC
6199+
CC=${CC}
6200+
CFLAGS="${NOT_THE_CFLAGS} -Wdeprecated-non-prototype"
6201+
ac_save_c_werror_flag=$ac_c_werror_flag
6202+
ac_c_werror_flag=yes
6203+
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6204+
/* end confdefs.h. */
6205+
6206+
int
6207+
main ()
6208+
{
6209+
6210+
;
6211+
return 0;
6212+
}
6213+
_ACEOF
6214+
if ac_fn_c_try_compile "$LINENO"; then :
6215+
pgac_cv_prog_CC_cflags__Wdeprecated_non_prototype=yes
6216+
else
6217+
pgac_cv_prog_CC_cflags__Wdeprecated_non_prototype=no
6218+
fi
6219+
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6220+
ac_c_werror_flag=$ac_save_c_werror_flag
6221+
CFLAGS="$pgac_save_CFLAGS"
6222+
CC="$pgac_save_CC"
6223+
fi
6224+
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wdeprecated_non_prototype" >&5
6225+
$as_echo "$pgac_cv_prog_CC_cflags__Wdeprecated_non_prototype" >&6; }
6226+
if test x"$pgac_cv_prog_CC_cflags__Wdeprecated_non_prototype" = x"yes"; then
6227+
NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wdeprecated-non-prototype"
6228+
fi
6229+
6230+
6231+
if test -n "$NOT_THE_CFLAGS"; then
6232+
CFLAGS="$CFLAGS -Wno-deprecated-non-prototype"
6233+
fi
61896234
# Similarly disable useless truncation warnings from gcc 8+
61906235
NOT_THE_CFLAGS=""
61916236
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wformat-truncation, for NOT_THE_CFLAGS" >&5
@@ -7100,6 +7145,48 @@ fi
71007145
BITCODE_CFLAGS="$BITCODE_CFLAGS -Wno-compound-token-split-by-macro"
71017146
fi
71027147
NOT_THE_CFLAGS=""
7148+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -Wdeprecated-non-prototype, for NOT_THE_CFLAGS" >&5
7149+
$as_echo_n "checking whether ${CLANG} supports -Wdeprecated-non-prototype, for NOT_THE_CFLAGS... " >&6; }
7150+
if ${pgac_cv_prog_CLANG_cflags__Wdeprecated_non_prototype+:} false; then :
7151+
$as_echo_n "(cached) " >&6
7152+
else
7153+
pgac_save_CFLAGS=$CFLAGS
7154+
pgac_save_CC=$CC
7155+
CC=${CLANG}
7156+
CFLAGS="${NOT_THE_CFLAGS} -Wdeprecated-non-prototype"
7157+
ac_save_c_werror_flag=$ac_c_werror_flag
7158+
ac_c_werror_flag=yes
7159+
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7160+
/* end confdefs.h. */
7161+
7162+
int
7163+
main ()
7164+
{
7165+
7166+
;
7167+
return 0;
7168+
}
7169+
_ACEOF
7170+
if ac_fn_c_try_compile "$LINENO"; then :
7171+
pgac_cv_prog_CLANG_cflags__Wdeprecated_non_prototype=yes
7172+
else
7173+
pgac_cv_prog_CLANG_cflags__Wdeprecated_non_prototype=no
7174+
fi
7175+
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7176+
ac_c_werror_flag=$ac_save_c_werror_flag
7177+
CFLAGS="$pgac_save_CFLAGS"
7178+
CC="$pgac_save_CC"
7179+
fi
7180+
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__Wdeprecated_non_prototype" >&5
7181+
$as_echo "$pgac_cv_prog_CLANG_cflags__Wdeprecated_non_prototype" >&6; }
7182+
if test x"$pgac_cv_prog_CLANG_cflags__Wdeprecated_non_prototype" = x"yes"; then
7183+
NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wdeprecated-non-prototype"
7184+
fi
7185+
7186+
if test -n "$NOT_THE_CFLAGS"; then
7187+
BITCODE_CFLAGS="$BITCODE_CFLAGS -Wno-deprecated-non-prototype"
7188+
fi
7189+
NOT_THE_CFLAGS=""
71037190
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -Wformat-truncation, for NOT_THE_CFLAGS" >&5
71047191
$as_echo_n "checking whether ${CLANG} supports -Wformat-truncation, for NOT_THE_CFLAGS... " >&6; }
71057192
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
@@ -533,6 +533,13 @@ if test "$GCC" = yes -a "$ICC" = no; then
533533
if test -n "$NOT_THE_CFLAGS"; then
534534
CFLAGS="$CFLAGS -Wno-compound-token-split-by-macro"
535535
fi
536+
# Similarly remove clang 15+'s deprecated-non-prototype, as it warns about
537+
# tree-walking APIs that we can't reasonably change in the back branches.
538+
NOT_THE_CFLAGS=""
539+
PGAC_PROG_CC_VAR_OPT(NOT_THE_CFLAGS, [-Wdeprecated-non-prototype])
540+
if test -n "$NOT_THE_CFLAGS"; then
541+
CFLAGS="$CFLAGS -Wno-deprecated-non-prototype"
542+
fi
536543
# Similarly disable useless truncation warnings from gcc 8+
537544
NOT_THE_CFLAGS=""
538545
PGAC_PROG_CC_VAR_OPT(NOT_THE_CFLAGS, [-Wformat-truncation])
@@ -594,6 +601,11 @@ if test "$with_llvm" = yes ; then
594601
BITCODE_CFLAGS="$BITCODE_CFLAGS -Wno-compound-token-split-by-macro"
595602
fi
596603
NOT_THE_CFLAGS=""
604+
PGAC_PROG_VARCC_VARFLAGS_OPT(CLANG, NOT_THE_CFLAGS, [-Wdeprecated-non-prototype])
605+
if test -n "$NOT_THE_CFLAGS"; then
606+
BITCODE_CFLAGS="$BITCODE_CFLAGS -Wno-deprecated-non-prototype"
607+
fi
608+
NOT_THE_CFLAGS=""
597609
PGAC_PROG_VARCC_VARFLAGS_OPT(CLANG, NOT_THE_CFLAGS, [-Wformat-truncation])
598610
if test -n "$NOT_THE_CFLAGS"; then
599611
BITCODE_CFLAGS="$BITCODE_CFLAGS -Wno-format-truncation"

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp