From 06bb32ff00fc4b6d8581a2e91a17ddab5a1407d4 Mon Sep 17 00:00:00 2001 From: Danny Robson Date: Wed, 24 May 2017 15:16:33 +1000 Subject: [PATCH] warnings: disable unsafe-loop-optimisation This warning caused too many false positives with range-for and other language constructs and was very rarely actually helpful. Disable for the time being. --- nc_warnings.cmake | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/nc_warnings.cmake b/nc_warnings.cmake index f4fdfc4..a9d6dd7 100644 --- a/nc_warnings.cmake +++ b/nc_warnings.cmake @@ -34,12 +34,15 @@ append_compile_flag(-Wsign-promo) append_compile_flag(-Wstrict-aliasing) append_compile_flag(-Wstrict-overflow) append_compile_flag(-Wtype-limits) -append_compile_flag(-Wunsafe-loop-optimizations) append_compile_flag(-Wunused-but-set-variable) append_compile_flag(-Wunused-parameter) append_compile_flag(-Wpessimizing-move) append_compile_flag(-Wswitch-enum) +# dont use unsafe-loop-optimisations as there are too many false positives +# with language primitives like range-for. +# append_compile_flag(-Wunsafe-loop-optimizations) + # gcc-6.1.0 warnings append_compile_flag(-Wshift-negative-value) append_compile_flag(-Wnull-dereference)