@@ -6518,6 +6518,50 @@ fi
6518
6518
if test -n "$NOT_THE_CFLAGS"; then
6519
6519
CFLAGS="$CFLAGS -Wno-stringop-truncation"
6520
6520
fi
6521
+ # Suppress clang 16's strict warnings about function casts
6522
+ NOT_THE_CFLAGS=""
6523
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wcast-function-type-strict, for NOT_THE_CFLAGS" >&5
6524
+ $as_echo_n "checking whether ${CC} supports -Wcast-function-type-strict, for NOT_THE_CFLAGS... " >&6; }
6525
+ if ${pgac_cv_prog_CC_cflags__Wcast_function_type_strict+:} false; then :
6526
+ $as_echo_n "(cached) " >&6
6527
+ else
6528
+ pgac_save_CFLAGS=$CFLAGS
6529
+ pgac_save_CC=$CC
6530
+ CC=${CC}
6531
+ CFLAGS="${NOT_THE_CFLAGS} -Wcast-function-type-strict"
6532
+ ac_save_c_werror_flag=$ac_c_werror_flag
6533
+ ac_c_werror_flag=yes
6534
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6535
+ /* end confdefs.h. */
6536
+
6537
+ int
6538
+ main ()
6539
+ {
6540
+
6541
+ ;
6542
+ return 0;
6543
+ }
6544
+ _ACEOF
6545
+ if ac_fn_c_try_compile "$LINENO"; then :
6546
+ pgac_cv_prog_CC_cflags__Wcast_function_type_strict=yes
6547
+ else
6548
+ pgac_cv_prog_CC_cflags__Wcast_function_type_strict=no
6549
+ fi
6550
+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6551
+ ac_c_werror_flag=$ac_save_c_werror_flag
6552
+ CFLAGS="$pgac_save_CFLAGS"
6553
+ CC="$pgac_save_CC"
6554
+ fi
6555
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wcast_function_type_strict" >&5
6556
+ $as_echo "$pgac_cv_prog_CC_cflags__Wcast_function_type_strict" >&6; }
6557
+ if test x"$pgac_cv_prog_CC_cflags__Wcast_function_type_strict" = x"yes"; then
6558
+ NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wcast-function-type-strict"
6559
+ fi
6560
+
6561
+
6562
+ if test -n "$NOT_THE_CFLAGS"; then
6563
+ CFLAGS="$CFLAGS -Wno-cast-function-type-strict"
6564
+ fi
6521
6565
elif test "$ICC" = yes; then
6522
6566
# Intel's compiler has a bug/misoptimization in checking for
6523
6567
# division by NAN (NaN == 0), -mp1 fixes it, so add it to the CFLAGS.
0 commit comments