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

Commit101c37c

Browse files
committed
Disable clang 16's -Wcast-function-type-strict.
Clang 16 is still in development, but seawasp reveals that it hasstarted warning about many of our casts of function pointers (thoseintroduced by commit1c27d16, and some older ones). Disable the newwarning for now, since otherwise buildfarm animal seawasp fails, and wehave no current plans to change our strategy for these callback functiontypes.May be back-patched with other Clang/LLVM 16 changes around releasetime.Discussion:https://postgr.es/m/CA%2BhUKGJvX%2BL3aMN84ksT-cGy08VHErRNip3nV-WmTx7f6Pqhyw%40mail.gmail.com
1 parenta850075 commit101c37c

File tree

3 files changed

+53
-0
lines changed

3 files changed

+53
-0
lines changed

‎configure

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6611,6 +6611,50 @@ fi
66116611
if test -n "$NOT_THE_CFLAGS"; then
66126612
CFLAGS="$CFLAGS -Wno-stringop-truncation"
66136613
fi
6614+
# Suppress clang 16's strict warnings about function casts
6615+
NOT_THE_CFLAGS=""
6616+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wcast-function-type-strict, for NOT_THE_CFLAGS" >&5
6617+
$as_echo_n "checking whether ${CC} supports -Wcast-function-type-strict, for NOT_THE_CFLAGS... " >&6; }
6618+
if ${pgac_cv_prog_CC_cflags__Wcast_function_type_strict+:} false; then :
6619+
$as_echo_n "(cached) " >&6
6620+
else
6621+
pgac_save_CFLAGS=$CFLAGS
6622+
pgac_save_CC=$CC
6623+
CC=${CC}
6624+
CFLAGS="${NOT_THE_CFLAGS} -Wcast-function-type-strict"
6625+
ac_save_c_werror_flag=$ac_c_werror_flag
6626+
ac_c_werror_flag=yes
6627+
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6628+
/* end confdefs.h. */
6629+
6630+
int
6631+
main ()
6632+
{
6633+
6634+
;
6635+
return 0;
6636+
}
6637+
_ACEOF
6638+
if ac_fn_c_try_compile "$LINENO"; then :
6639+
pgac_cv_prog_CC_cflags__Wcast_function_type_strict=yes
6640+
else
6641+
pgac_cv_prog_CC_cflags__Wcast_function_type_strict=no
6642+
fi
6643+
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6644+
ac_c_werror_flag=$ac_save_c_werror_flag
6645+
CFLAGS="$pgac_save_CFLAGS"
6646+
CC="$pgac_save_CC"
6647+
fi
6648+
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wcast_function_type_strict" >&5
6649+
$as_echo "$pgac_cv_prog_CC_cflags__Wcast_function_type_strict" >&6; }
6650+
if test x"$pgac_cv_prog_CC_cflags__Wcast_function_type_strict" = x"yes"; then
6651+
NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wcast-function-type-strict"
6652+
fi
6653+
6654+
6655+
if test -n "$NOT_THE_CFLAGS"; then
6656+
CFLAGS="$CFLAGS -Wno-cast-function-type-strict"
6657+
fi
66146658
elif test "$ICC" = yes; then
66156659
# Intel's compiler has a bug/misoptimization in checking for
66166660
# division by NAN (NaN == 0), -mp1 fixes it, so add it to the CFLAGS.

‎configure.ac

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -573,6 +573,12 @@ if test "$GCC" = yes -a "$ICC" = no; then
573573
if test -n "$NOT_THE_CFLAGS"; then
574574
CFLAGS="$CFLAGS -Wno-stringop-truncation"
575575
fi
576+
# Suppress clang 16's strict warnings about function casts
577+
NOT_THE_CFLAGS=""
578+
PGAC_PROG_CC_VAR_OPT(NOT_THE_CFLAGS,[-Wcast-function-type-strict])
579+
if test -n "$NOT_THE_CFLAGS"; then
580+
CFLAGS="$CFLAGS -Wno-cast-function-type-strict"
581+
fi
576582
elif test "$ICC" = yes; then
577583
# Intel's compiler has a bug/misoptimization in checking for
578584
# division by NAN (NaN == 0), -mp1 fixes it, so add it to the CFLAGS.

‎meson.build

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1773,6 +1773,9 @@ negative_warning_flags = [
17731773
'format-truncation',
17741774
'stringop-truncation',
17751775

1776+
# Suppress clang 16's strict warnings about function casts
1777+
'cast-function-type-strict',
1778+
17761779
# To make warning_level=2 / -Wextra work, we'd need at least the following
17771780
# 'clobbered',
17781781
# 'missing-field-initializers',

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp