Skip to content

Commit 0b2c65f

Browse files
committed
fix: disable stringop-overread for gcc11
1 parent 8af10d7 commit 0b2c65f

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

configure.ac

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -457,6 +457,15 @@ if test "x$enable_werror" = "xyes"; then
457457
AX_CHECK_COMPILE_FLAG([-Werror=return-type], [], [ERROR_CXXFLAGS="$ERROR_CXXFLAGS -Wno-error=return-type"], [$CXXFLAG_WERROR],
458458
[AC_LANG_SOURCE([[#include <cassert>
459459
int f(){ assert(false); }]])])
460+
dnl -Wstringop-overread is broken in GCC 11.
461+
AC_COMPILE_IFELSE(
462+
[AC_LANG_PROGRAM([[]],
463+
[[#if __GNUC__ == 11
464+
#error -Wstringop-overread is broken in GCC 11
465+
#endif
466+
]])],
467+
[],
468+
[ERROR_CXXFLAGS="$ERROR_CXXFLAGS -Wno-stringop-overread"])
460469
fi
461470

462471
if test "x$CXXFLAGS_overridden" = "xno"; then

0 commit comments

Comments
 (0)