Skip to content

Commit 04c0955

Browse files
committed
Merge bitcoin#18887: build: enable -Werror=gnu
a30b0a2 build: enable -Werror=gnu (Vasil Dimov) Pull request description: Stop the build if a warning is emitted due to `-Wgnu` and `--enable-werror` has been used. As usual - this would help notice such a warning that is about to be introduced in new code. This is a followup to bitcoin#18088 build: ensure we aren't using GNU extensions ACKs for top commit: practicalswift: ACK a30b0a2 Empact: ACK bitcoin@a30b0a2 Tree-SHA512: f81b71cf3ee4db88b6f664c571075e0d30800a604f067f44273f256695a1dea533779db2ac859dd0a4cd8b66289c3e45f4aff1cfadfa160a1c354237167b05e2
2 parents a9a6d94 + a30b0a2 commit 04c0955

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

configure.ac

+1
Original file line numberDiff line numberDiff line change
@@ -360,6 +360,7 @@ if test "x$enable_werror" = "xyes"; then
360360
if test "x$CXXFLAG_WERROR" = "x"; then
361361
AC_MSG_ERROR("enable-werror set but -Werror is not usable")
362362
fi
363+
AX_CHECK_COMPILE_FLAG([-Werror=gnu],[ERROR_CXXFLAGS="$ERROR_CXXFLAGS -Werror=gnu"],,[[$CXXFLAG_WERROR]])
363364
AX_CHECK_COMPILE_FLAG([-Werror=vla],[ERROR_CXXFLAGS="$ERROR_CXXFLAGS -Werror=vla"],,[[$CXXFLAG_WERROR]])
364365
AX_CHECK_COMPILE_FLAG([-Werror=switch],[ERROR_CXXFLAGS="$ERROR_CXXFLAGS -Werror=switch"],,[[$CXXFLAG_WERROR]])
365366
AX_CHECK_COMPILE_FLAG([-Werror=thread-safety-analysis],[ERROR_CXXFLAGS="$ERROR_CXXFLAGS -Werror=thread-safety-analysis"],,[[$CXXFLAG_WERROR]])

0 commit comments

Comments
 (0)