From 9b095bf15cf5225b4223d33614d001cd44a501fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20L=C3=B3pez-Ib=C3=A1=C3=B1ez?= Date: Thu, 17 May 2012 11:50:37 +0000 Subject: c.opt (--pedantic-errors,-pedantic-errors): Do not handle here. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 2012-05-17 Manuel López-Ibáñez c-family/ * c.opt (--pedantic-errors,-pedantic-errors): Do not handle here. * c-opts.c (c_common_handle_option): Do not handle explicitly Wreturn-type, Wwrite-strings, warn_ecpp, and -pedantic-errors. gcc/ * opts.c (common_handle_option): -pedantic-errors enables -Wpedantic. (enable_warning_as_error): Do not special case Wuninitialized. * optc-gen.awk: Add sanity checks. From-SVN: r187628 --- gcc/optc-gen.awk | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) (limited to 'gcc/optc-gen.awk') diff --git a/gcc/optc-gen.awk b/gcc/optc-gen.awk index 1d46a5d..0abe6bc 100644 --- a/gcc/optc-gen.awk +++ b/gcc/optc-gen.awk @@ -391,10 +391,14 @@ for (i = 0; i < n_enabledby; i++) { n_enables = split(enables[enabledby_name], thisenable, ","); for (j = 1; j < n_enables; j++) { opt_var_name = var_name(flags[opt_numbers[thisenable[j]]]); - print " if (!opts_set->x_" opt_var_name ")" - print " handle_generated_option (opts, opts_set," - print " " opt_enum(thisenable[j]) ", NULL, value," - print " lang_mask, kind, loc, handlers, dc);" + if (opt_var_name != "") { + print " if (!opts_set->x_" opt_var_name ")" + print " handle_generated_option (opts, opts_set," + print " " opt_enum(thisenable[j]) ", NULL, value," + print " lang_mask, kind, loc, handlers, dc);" + } else { + print "#error " thisenable[j] " does not have a Var() flag" + } } print " break;\n" } @@ -430,10 +434,14 @@ for (i = 0; i < n_langs; i++) { n_enables = split(enables[lang_name,enabledby_name], thisenable, ","); for (j = 1; j < n_enables; j++) { opt_var_name = var_name(flags[opt_numbers[thisenable[j]]]); - print " if (!opts_set->x_" opt_var_name ")" - print " handle_generated_option (opts, opts_set," - print " " opt_enum(thisenable[j]) ", arg, value," - print " lang_mask, kind, loc, handlers, dc);" + if (opt_var_name != "") { + print " if (!opts_set->x_" opt_var_name ")" + print " handle_generated_option (opts, opts_set," + print " " opt_enum(thisenable[j]) ", arg, value," + print " lang_mask, kind, loc, handlers, dc);" + } else { + print "#error " thisenable[j] " does not have a Var() flag" + } } print " break;\n" } -- cgit v1.1