From 57a56e00067b4546bb0da15fb00653ee0341f5af Mon Sep 17 00:00:00 2001 From: "Frank Ch. Eigler" Date: Thu, 25 Feb 2010 21:14:52 -0500 Subject: PR11075: -W option to turn warnings into errors * session.h * NEWS: Discuss it. * main.cxx: Parse it. * session.h (num_errors): Provide it. * semok/fortyeight.stp, semok/thirtyseven.stp: Test it. --- main.cxx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'main.cxx') diff --git a/main.cxx b/main.cxx index 7073f7d3..c7be3bc1 100644 --- a/main.cxx +++ b/main.cxx @@ -93,6 +93,7 @@ usage (systemtap_session& s, int exitcode) << " -k keep temporary directory" << endl << " -u unoptimized translation" << (s.unoptimized ? " [set]" : "") << endl << " -w suppress warnings" << (s.suppress_warnings ? " [set]" : "") << endl + << " -W turn warnings into errors" << (s.panic_warnings ? " [set]" : "") << endl << " -g guru mode" << (s.guru_mode ? " [set]" : "") << endl << " -P prologue-searching for function probes" << (s.prologue_searching ? " [set]" : "") << endl @@ -504,6 +505,7 @@ main (int argc, char * const argv []) s.bulk_mode = false; s.unoptimized = false; s.suppress_warnings = false; + s.panic_warnings = false; s.listing_mode = false; s.listing_mode_vars = false; @@ -640,7 +642,7 @@ main (int argc, char * const argv []) { "help", 0, &long_opt, LONG_OPT_HELP }, { NULL, 0, NULL, 0 } }; - int grc = getopt_long (argc, argv, "hVvtp:I:e:o:R:r:a:m:kgPc:x:D:bs:uqwl:d:L:FS:B:", + int grc = getopt_long (argc, argv, "hVvtp:I:e:o:R:r:a:m:kgPc:x:D:bs:uqwl:d:L:FS:B:W", long_options, NULL); if (grc < 0) break; @@ -663,6 +665,10 @@ main (int argc, char * const argv []) s.suppress_warnings = true; break; + case 'W': + s.panic_warnings = true; + break; + case 'p': s.last_pass = (int)strtoul(optarg, &num_endptr, 10); if (*num_endptr != '\0' || s.last_pass < 1 || s.last_pass > 5) -- cgit