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