From c2f22b1314148b79bb92a1ef116c1b732fcc5e34 Mon Sep 17 00:00:00 2001 From: Bernhard Schommer Date: Thu, 26 Jan 2017 09:18:24 +0100 Subject: Added -w to disable all options. Bug 19872 --- cparser/Cerrors.ml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'cparser') diff --git a/cparser/Cerrors.ml b/cparser/Cerrors.ml index c7b791e0..476aa419 100644 --- a/cparser/Cerrors.ml +++ b/cparser/Cerrors.ml @@ -18,6 +18,7 @@ open Format open Commandline +(* Should errors be treated as fatal *) let error_fatal = ref false (* Test if color diagnostics are available by testing if stderr is a tty @@ -169,6 +170,9 @@ let wall () = Inline_asm_sdump; ] +let wnothing () = + active_warnings :=[] + (* Make all warnings an error *) let werror () = error_warnings:=[ @@ -329,7 +333,8 @@ let warning_options = Exact ("-fdiagnostics-color"), Ignore; (* Either output supports it or no color *) Exact ("-fno-diagnostics-color"), Unset color_diagnostics; Exact ("-Werror"), Unit werror; - Exact ("-Wall"), Unit wall;] + Exact ("-Wall"), Unit wall; + Exact ("-w"), Unit wnothing;] let warning_help = {|Diagnostic options: -Wall Enable all warnings -- cgit