Skip to content

Commit d92204c

Browse files
committed
build: add warning to detect hidden copies in range-for loops
1 parent 466e16e commit d92204c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

configure.ac

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,7 @@ if test "x$CXXFLAGS_overridden" = "xno"; then
301301
AX_CHECK_COMPILE_FLAG([-Wvla],[WARN_CXXFLAGS="$WARN_CXXFLAGS -Wvla"],,[[$CXXFLAG_WERROR]])
302302
AX_CHECK_COMPILE_FLAG([-Wformat-security],[WARN_CXXFLAGS="$WARN_CXXFLAGS -Wformat-security"],,[[$CXXFLAG_WERROR]])
303303
AX_CHECK_COMPILE_FLAG([-Wthread-safety-analysis],[WARN_CXXFLAGS="$WARN_CXXFLAGS -Wthread-safety-analysis"],,[[$CXXFLAG_WERROR]])
304+
AX_CHECK_COMPILE_FLAG([-Wrange-loop-analysis],[WARN_CXXFLAGS="$WARN_CXXFLAGS -Wrange-loop-analysis"],,[[$CXXFLAG_WERROR]])
304305

305306
## Some compilers (gcc) ignore unknown -Wno-* options, but warn about all
306307
## unknown options if any other warning is produced. Test the -Wfoo case, and

0 commit comments

Comments
 (0)