It seems it's better to error out when someone passes bogus option to
-fsanitize rather than only give a warning.  Error gives non-zero exit
status so with this patch the behavior is friendlier to configure
scripts.

Bootstrapped on x86_64-linux, ok for trunk?

2014-05-05  Marek Polacek  <pola...@redhat.com>

        PR driver/61065
        * opts.c (common_handle_option): Call error_at instead of warning_at.

diff --git gcc/opts.c gcc/opts.c
index 3c214f0..f15852d 100644
--- gcc/opts.c
+++ gcc/opts.c
@@ -1495,9 +1495,9 @@ common_handle_option (struct gcc_options *opts,
                }
 
            if (! found)
-             warning_at (loc, 0,
-                         "unrecognized argument to -fsanitize= option: %q.*s",
-                         (int) len, p);
+             error_at (loc,
+                       "unrecognized argument to -fsanitize= option: %q.*s",
+                       (int) len, p);
 
            if (comma == NULL)
              break;

        Marek

Reply via email to