Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 23 additions & 23 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -450,15 +450,6 @@ if test "$enable_werror" = "yes"; then
fi
ERROR_CXXFLAGS=$CXXFLAG_WERROR

dnl -Warray-bounds cause problems with GCC. Do not treat these warnings as errors.
dnl Suppress -Warray-bounds entirely because of noisy output, currently unhappy with immer implementation.
AX_CHECK_COMPILE_FLAG([-Warray-bounds], [NOWARN_CXXFLAGS="$NOWARN_CXXFLAGS -Wno-array-bounds"], [], [$CXXFLAG_WERROR], [AC_LANG_SOURCE([
#if defined(__clang__) || defined(__INTEL_COMPILER) || !defined(__GNUC__)
#error Non-GCC compiler detected, not setting flag
#endif
int main(void) { return 0; }
])])

dnl -Wattributes cause problems with some versions of GCC. Do not treat these warnings as errors.
AX_CHECK_COMPILE_FLAG([-Wattributes], [NOWARN_CXXFLAGS="$NOWARN_CXXFLAGS -Wno-error=attributes"], [], [$CXXFLAG_WERROR], [AC_LANG_SOURCE([
#if defined(__clang__) || defined(__INTEL_COMPILER) || !defined(__GNUC__)
Expand All @@ -478,22 +469,31 @@ if test "$enable_werror" = "yes"; then
#endif
int main(void) { return 0; }
])])

dnl -Wstringop-overread and -Wstringop-overflow are broken in GCC. Suppress warnings entirely to avoid noisy output.
AX_CHECK_COMPILE_FLAG([-Wstringop-overread], [NOWARN_CXXFLAGS="$NOWARN_CXXFLAGS -Wno-stringop-overread"], [], [$CXXFLAG_WERROR], [AC_LANG_SOURCE([
#if defined(__clang__) || defined(__INTEL_COMPILER) || !defined(__GNUC__)
#error Non-GCC compiler detected, not setting flag
#endif
int main(void) { return 0; }
])])
AX_CHECK_COMPILE_FLAG([-Wstringop-overflow], [NOWARN_CXXFLAGS="$NOWARN_CXXFLAGS -Wno-stringop-overflow"], [], [$CXXFLAG_WERROR], [AC_LANG_SOURCE([
#if defined(__clang__) || defined(__INTEL_COMPILER) || !defined(__GNUC__)
#error Non-GCC compiler detected, not setting flag
#endif
int main(void) { return 0; }
])])
fi

dnl -Warray-bounds cause problems with GCC. Do not treat these warnings as errors.
dnl Suppress -Warray-bounds entirely because of noisy output, currently unhappy with immer implementation.
AX_CHECK_COMPILE_FLAG([-Warray-bounds], [NOWARN_CXXFLAGS="$NOWARN_CXXFLAGS -Wno-array-bounds"], [], [$CXXFLAG_WERROR], [AC_LANG_SOURCE([
#if defined(__clang__) || defined(__INTEL_COMPILER) || !defined(__GNUC__)
#error Non-GCC compiler detected, not setting flag
#endif
int main(void) { return 0; }
])])

dnl -Wstringop-overread and -Wstringop-overflow are broken in GCC. Suppress warnings entirely to avoid noisy output.
AX_CHECK_COMPILE_FLAG([-Wstringop-overread], [NOWARN_CXXFLAGS="$NOWARN_CXXFLAGS -Wno-stringop-overread"], [], [$CXXFLAG_WERROR], [AC_LANG_SOURCE([
#if defined(__clang__) || defined(__INTEL_COMPILER) || !defined(__GNUC__)
#error Non-GCC compiler detected, not setting flag
#endif
int main(void) { return 0; }
])])
AX_CHECK_COMPILE_FLAG([-Wstringop-overflow], [NOWARN_CXXFLAGS="$NOWARN_CXXFLAGS -Wno-stringop-overflow"], [], [$CXXFLAG_WERROR], [AC_LANG_SOURCE([
#if defined(__clang__) || defined(__INTEL_COMPILER) || !defined(__GNUC__)
#error Non-GCC compiler detected, not setting flag
#endif
int main(void) { return 0; }
])])

AX_CHECK_COMPILE_FLAG([-Wall], [WARN_CXXFLAGS="$WARN_CXXFLAGS -Wall"], [], [$CXXFLAG_WERROR])
AX_CHECK_COMPILE_FLAG([-Wextra], [WARN_CXXFLAGS="$WARN_CXXFLAGS -Wextra"], [], [$CXXFLAG_WERROR])
AX_CHECK_COMPILE_FLAG([-Wgnu], [WARN_CXXFLAGS="$WARN_CXXFLAGS -Wgnu"], [], [$CXXFLAG_WERROR])
Expand Down
Loading