aboutsummaryrefslogtreecommitdiff
path: root/gcc/opts.c
diff options
context:
space:
mode:
authorXinliang David Li <davidxl@google.com>2011-04-26 16:06:09 +0000
committerXinliang David Li <davidxl@gcc.gnu.org>2011-04-26 16:06:09 +0000
commit2f964ad6d4ec69a76954d90c273db385c807940f (patch)
treeb94bed7986e2724eb7508e1ebf3f157968133e57 /gcc/opts.c
parent86262bb186922557dba15c5fa21785837f4006cd (diff)
downloadgcc-2f964ad6d4ec69a76954d90c273db385c807940f.zip
gcc-2f964ad6d4ec69a76954d90c273db385c807940f.tar.gz
gcc-2f964ad6d4ec69a76954d90c273db385c807940f.tar.bz2
Implement -Wno-maybe-uninitialized
From-SVN: r172978
Diffstat (limited to 'gcc/opts.c')
-rw-r--r--gcc/opts.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/opts.c b/gcc/opts.c
index cd581f6..f00e1b2 100644
--- a/gcc/opts.c
+++ b/gcc/opts.c
@@ -1680,6 +1680,11 @@ common_handle_option (struct gcc_options *opts,
/* No-op. Used by the driver and passed to us because it starts with f.*/
break;
+ case OPT_Wuninitialized:
+ /* Also turn on maybe uninitialized warning. */
+ warn_maybe_uninitialized = value;
+ break;
+
default:
/* If the flag was handled in a standard way, assume the lack of
processing here is intentional. */
@@ -1958,6 +1963,9 @@ enable_warning_as_error (const char *arg, int value, unsigned int lang_mask,
control_warning_option (option_index, (int) kind, value,
loc, lang_mask,
handlers, opts, opts_set, dc);
+ if (option_index == OPT_Wuninitialized)
+ enable_warning_as_error ("maybe-uninitialized", value, lang_mask,
+ handlers, opts, opts_set, loc, dc);
}
free (new_option);
}