Index: gcc/tree-vrp.c
===================================================================
--- gcc/tree-vrp.c	(revision 192379)
+++ gcc/tree-vrp.c	(working copy)
@@ -6671,11 +6671,11 @@ vrp_evaluate_conditional (enum tree_code
 
 	  if (!gimple_has_location (stmt))
 	    location = input_location;
 	  else
 	    location = gimple_location (stmt);
-	  warning_at (location, OPT_Wstrict_overflow, "%s", warnmsg);
+	  warning_at (location, OPT_Wstrict_overflow_, "%s", warnmsg);
 	}
     }
 
   if (warn_type_limits
       && ret && only_ranges
@@ -8140,11 +8140,11 @@ simplify_div_or_mod_using_ranges (gimple
 
 	  if (!gimple_has_location (stmt))
 	    location = input_location;
 	  else
 	    location = gimple_location (stmt);
-	  warning_at (location, OPT_Wstrict_overflow,
+	  warning_at (location, OPT_Wstrict_overflow_,
 		      "assuming signed overflow does not occur when "
 		      "simplifying %</%> or %<%%%> to %<>>%> or %<&%>");
 	}
     }
 
@@ -8222,11 +8222,11 @@ simplify_abs_using_ranges (gimple stmt)
 
 	      if (!gimple_has_location (stmt))
 		location = input_location;
 	      else
 		location = gimple_location (stmt);
-	      warning_at (location, OPT_Wstrict_overflow,
+	      warning_at (location, OPT_Wstrict_overflow_,
 			  "assuming signed overflow does not occur when "
 			  "simplifying %<abs (X)%> to %<X%> or %<-X%>");
 	    }
 
 	  gimple_assign_set_rhs1 (stmt, op);
Index: gcc/flags.h
===================================================================
--- gcc/flags.h	(revision 192379)
+++ gcc/flags.h	(working copy)
@@ -35,18 +35,10 @@ extern int base_of_path (const char *pat
 
 /* Return true iff flags are set as if -ffast-math.  */
 extern bool fast_math_flags_set_p (const struct gcc_options *);
 extern bool fast_math_flags_struct_set_p (struct cl_optimization *);
 
-/* Used to set the level of -Wstrict-aliasing in OPTS, when no level
-   is specified.  The external way to set the default level is to use
-   -Wstrict-aliasing=level.
-   ONOFF is assumed to take value 1 when -Wstrict-aliasing is specified,
-   and 0 otherwise.  After calling this function, wstrict_aliasing will be
-   set to the default value of -Wstrict_aliasing=level.  */
-
-extern void set_Wstrict_aliasing (struct gcc_options *opts, int onoff);
 
 /* Now the symbols that are set with `-f' switches.  */
 
 /* True if printing into -fdump-final-insns= dump.  */
 
Index: gcc/opts-common.c
===================================================================
--- gcc/opts-common.c	(revision 192379)
+++ gcc/opts-common.c	(working copy)
@@ -354,10 +354,146 @@ static const struct option_map option_ma
     { "--warn-no-", NULL, "-W", false, true },
     { "--", NULL, "-f", true, false },
     { "--no-", NULL, "-f", false, true }
   };
 
+static void
+option_convert_arg (const struct cl_option *option,
+                     const char *&arg, int & value,
+                     unsigned int lang_mask,
+                     int & errors)
+{
+  /* Convert the argument to lowercase if appropriate.  */
+  if (arg && option->cl_tolower)
+    {
+      size_t j;
+      size_t len = strlen (arg);
+      char *arg_lower = XNEWVEC (char, len + 1);
+
+      for (j = 0; j < len; j++)
+	arg_lower[j] = TOLOWER ((unsigned char) arg[j]);
+      arg_lower[len] = 0;
+      arg = arg_lower;
+    }
+
+  /* If the switch takes an integer, convert it.  */
+  if (arg && option->cl_uinteger)
+    {
+      value = integral_argument (arg);
+      if (value == -1)
+	errors |= CL_ERR_UINT_ARG;
+    }
+
+  /* If the switch takes an enumerated argument, convert it.  */
+  if (arg && (option->var_type == CLVC_ENUM))
+    {
+      const struct cl_enum *e = &cl_enums[option->var_enum];
+
+      gcc_assert (value == 1);
+      if (enum_arg_to_value (e->values, arg, &value, lang_mask))
+	{
+	  const char *carg = NULL;
+
+	  if (enum_value_to_arg (e->values, &carg, value, lang_mask))
+	    arg = carg;
+	  gcc_assert (carg != NULL);
+	}
+      else
+	errors |= CL_ERR_ENUM_ARG;
+    }
+}
+
+static void
+handle_alias_option (size_t & opt_index,
+                     const struct cl_option * &option,
+                     const char * &arg, int & value,
+                     unsigned int lang_mask,
+                     unsigned int separate_args,
+                     const char * &warn_message,
+                     int & errors)
+{
+  size_t new_opt_index = option->alias_target;
+
+  if (new_opt_index == OPT_SPECIAL_ignore)
+    {
+      gcc_assert (option->alias_arg == NULL);
+      gcc_assert (option->neg_alias_arg == NULL);
+      opt_index = new_opt_index;
+      arg = NULL;
+      value = 1;
+    }
+  else
+    {
+      const struct cl_option *new_option = &cl_options[new_opt_index];
+      bool separate_arg_flag;
+      bool joined_arg_flag;
+      
+      /* The new option must not be an alias itself.  */
+      gcc_assert (new_option->alias_target == N_OPTS
+                  || new_option->cl_separate_alias);
+      
+      if (option->neg_alias_arg)
+        {
+          gcc_assert (option->alias_arg != NULL);
+          gcc_assert (arg == NULL);
+          gcc_assert (!option->cl_negative_alias);
+          if (value)
+            arg = option->alias_arg;
+          else
+            arg = option->neg_alias_arg;
+          value = 1;
+        }
+      else if (option->alias_arg)
+        {
+          gcc_assert (value == 1);
+          gcc_assert (arg == NULL);
+          gcc_assert (!option->cl_negative_alias);
+          arg = option->alias_arg;
+        }
+      
+      if (option->cl_negative_alias)
+        value = !value;
+      
+      opt_index = new_opt_index;
+      option = new_option;
+      
+      if (value == 0)
+        gcc_assert (!option->cl_reject_negative);
+      
+      /* Recompute what arguments are allowed.  */
+      separate_arg_flag = ((option->flags & CL_SEPARATE)
+                           && !(option->cl_no_driver_arg
+                                && (lang_mask & CL_DRIVER)));
+      joined_arg_flag = (option->flags & CL_JOINED) != 0;
+      
+      if (separate_args > 1 || option->cl_separate_nargs)
+        gcc_assert (separate_args
+                    == (unsigned int) option->cl_separate_nargs + 1);
+      
+      if (!(errors & CL_ERR_MISSING_ARG))
+        {
+          if (separate_arg_flag || joined_arg_flag)
+            {
+              if (option->cl_missing_ok && arg == NULL)
+                arg = "";
+              gcc_assert (arg != NULL);
+            }
+          else
+            gcc_assert (arg == NULL);
+        }
+      
+      /* Recheck for warnings and disabled options.  */
+      if (option->warn_message)
+        {
+          gcc_assert (warn_message == NULL);
+          warn_message = option->warn_message;
+        }
+      if (option->cl_disabled)
+        errors |= CL_ERR_DISABLED;
+    }
+}
+
 /* Decode the switch beginning at ARGV for the language indicated by
    LANG_MASK (including CL_COMMON and CL_TARGET if applicable), into
    the structure *DECODED.  Returns the number of switches
    consumed.  */
 
@@ -500,131 +636,19 @@ decode_cmdline_option (const char **argv
   /* Is this option an alias (or an ignored option, marked as an alias
      of OPT_SPECIAL_ignore)?  */
   if (option->alias_target != N_OPTS
       && (!option->cl_separate_alias || have_separate_arg))
     {
-      size_t new_opt_index = option->alias_target;
-
-      if (new_opt_index == OPT_SPECIAL_ignore)
-	{
-	  gcc_assert (option->alias_arg == NULL);
-	  gcc_assert (option->neg_alias_arg == NULL);
-	  opt_index = new_opt_index;
-	  arg = NULL;
-	  value = 1;
-	}
-      else
-	{
-	  const struct cl_option *new_option = &cl_options[new_opt_index];
-
-	  /* The new option must not be an alias itself.  */
-	  gcc_assert (new_option->alias_target == N_OPTS
-		      || new_option->cl_separate_alias);
-
-	  if (option->neg_alias_arg)
-	    {
-	      gcc_assert (option->alias_arg != NULL);
-	      gcc_assert (arg == NULL);
-	      gcc_assert (!option->cl_negative_alias);
-	      if (value)
-		arg = option->alias_arg;
-	      else
-		arg = option->neg_alias_arg;
-	      value = 1;
-	    }
-	  else if (option->alias_arg)
-	    {
-	      gcc_assert (value == 1);
-	      gcc_assert (arg == NULL);
-	      gcc_assert (!option->cl_negative_alias);
-	      arg = option->alias_arg;
-	    }
-
-	  if (option->cl_negative_alias)
-	    value = !value;
-
-	  opt_index = new_opt_index;
-	  option = new_option;
-
-	  if (value == 0)
-	    gcc_assert (!option->cl_reject_negative);
-
-	  /* Recompute what arguments are allowed.  */
-	  separate_arg_flag = ((option->flags & CL_SEPARATE)
-			       && !(option->cl_no_driver_arg
-				    && (lang_mask & CL_DRIVER)));
-	  joined_arg_flag = (option->flags & CL_JOINED) != 0;
-
-	  if (separate_args > 1 || option->cl_separate_nargs)
-	    gcc_assert (separate_args
-			== (unsigned int) option->cl_separate_nargs + 1);
-
-	  if (!(errors & CL_ERR_MISSING_ARG))
-	    {
-	      if (separate_arg_flag || joined_arg_flag)
-		{
-		  if (option->cl_missing_ok && arg == NULL)
-		    arg = "";
-		  gcc_assert (arg != NULL);
-		}
-	      else
-		gcc_assert (arg == NULL);
-	    }
-
-	  /* Recheck for warnings and disabled options.  */
-	  if (option->warn_message)
-	    {
-	      gcc_assert (warn_message == NULL);
-	      warn_message = option->warn_message;
-	    }
-	  if (option->cl_disabled)
-	    errors |= CL_ERR_DISABLED;
-	}
+      handle_alias_option (opt_index, option, arg, value, lang_mask,
+                           separate_args, warn_message, errors);
     }
 
   /* Check if this is a switch for a different front end.  */
   if (!option_ok_for_language (option, lang_mask))
     errors |= CL_ERR_WRONG_LANG;
 
-  /* Convert the argument to lowercase if appropriate.  */
-  if (arg && option->cl_tolower)
-    {
-      size_t j;
-      size_t len = strlen (arg);
-      char *arg_lower = XNEWVEC (char, len + 1);
-
-      for (j = 0; j < len; j++)
-	arg_lower[j] = TOLOWER ((unsigned char) arg[j]);
-      arg_lower[len] = 0;
-      arg = arg_lower;
-    }
-
-  /* If the switch takes an integer, convert it.  */
-  if (arg && option->cl_uinteger)
-    {
-      value = integral_argument (arg);
-      if (value == -1)
-	errors |= CL_ERR_UINT_ARG;
-    }
-
-  /* If the switch takes an enumerated argument, convert it.  */
-  if (arg && (option->var_type == CLVC_ENUM))
-    {
-      const struct cl_enum *e = &cl_enums[option->var_enum];
-
-      gcc_assert (value == 1);
-      if (enum_arg_to_value (e->values, arg, &value, lang_mask))
-	{
-	  const char *carg = NULL;
-
-	  if (enum_value_to_arg (e->values, &carg, value, lang_mask))
-	    arg = carg;
-	  gcc_assert (carg != NULL);
-	}
-      else
-	errors |= CL_ERR_ENUM_ARG;
-    }
+  option_convert_arg (option, arg, value, lang_mask, errors);
 
  done:
   decoded->opt_index = opt_index;
   decoded->arg = arg;
   decoded->value = value;
@@ -912,18 +936,27 @@ handle_generated_option (struct gcc_opti
 void
 generate_option (size_t opt_index, const char *arg, int value,
 		 unsigned int lang_mask, struct cl_decoded_option *decoded)
 {
   const struct cl_option *option = &cl_options[opt_index];
+  const char * warn_message = NULL;
+  int errors = 0;
+
+  if (option->alias_target != N_OPTS)
+    {
+      handle_alias_option (opt_index, option, arg, value, lang_mask,
+                           /*separate_args=*/0, warn_message, errors);
+      option_convert_arg (option, arg, value, lang_mask, errors);
+    }
 
   decoded->opt_index = opt_index;
   decoded->warn_message = NULL;
   decoded->arg = arg;
   decoded->value = value;
-  decoded->errors = (option_ok_for_language (option, lang_mask)
-		     ? 0
-		     : CL_ERR_WRONG_LANG);
+  decoded->errors = errors | (option_ok_for_language (option, lang_mask)
+                              ? 0
+                              : CL_ERR_WRONG_LANG);
 
   generate_canonical_option (opt_index, arg, value, decoded);
   switch (decoded->canonical_option_num_elements)
     {
     case 1:
@@ -1273,16 +1306,19 @@ control_warning_option (unsigned int opt
 			const struct cl_option_handlers *handlers,
 			struct gcc_options *opts,
 			struct gcc_options *opts_set,
 			diagnostic_context *dc)
 {
-  if (cl_options[opt_index].alias_target != N_OPTS)
-    opt_index = cl_options[opt_index].alias_target;
-  if (opt_index == OPT_SPECIAL_ignore)
-    return;
   if (dc)
-    diagnostic_classify_diagnostic (dc, opt_index, (diagnostic_t) kind, loc);
+    {
+      unsigned int opt_index_dc = opt_index;
+      if (cl_options[opt_index].alias_target != N_OPTS)
+        opt_index_dc = cl_options[opt_index].alias_target;
+      if (opt_index_dc == OPT_SPECIAL_ignore)
+        return;
+      diagnostic_classify_diagnostic (dc, opt_index_dc, (diagnostic_t) kind, loc);
+    }
   if (imply)
     {
       /* -Werror=foo implies -Wfoo.  */
       if (cl_options[opt_index].var_type == CLVC_BOOLEAN)
 	handle_generated_option (opts, opts_set,
Index: gcc/c-family/c.opt
===================================================================
--- gcc/c-family/c.opt	(revision 192379)
+++ gcc/c-family/c.opt	(working copy)
@@ -619,10 +619,19 @@ Warn about signed-unsigned comparisons
 
 Wsign-promo
 C++ ObjC++ Var(warn_sign_promo) Warning
 Warn when overload promotes from unsigned to signed
 
+Wstrict-aliasing=
+C ObjC C++ ObjC++ LangEnabledBy(C ObjC C++ ObjC++,Wall, 3, 0)
+;
+
+Wstrict-overflow=
+C ObjC C++ ObjC++ LangEnabledBy(C ObjC C++ ObjC++,Wall, 1, 0)
+;
+
+
 Wstrict-null-sentinel
 C++ ObjC++ Warning Var(warn_strict_null_sentinel)
 Warn about uncasted NULL used as sentinel
 
 Wstrict-prototypes
Index: gcc/c-family/c-opts.c
===================================================================
--- gcc/c-family/c-opts.c	(revision 192379)
+++ gcc/c-family/c-opts.c	(working copy)
@@ -358,10 +358,11 @@ c_common_handle_option (size_t scode, co
     case OPT_U:
       defer_opt (code, arg);
       break;
 
     case OPT_Wall:
+      /* ??? Don't add new options here. Use LangEnabledBy in c.opt.  */
       handle_generated_option (&global_options, &global_options_set,
 			       OPT_Wunused, NULL, value,
 			       c_family_lang_mask, kind, loc,
 			       handlers, global_dc);
       set_Wformat (value);
@@ -373,15 +374,11 @@ c_common_handle_option (size_t scode, co
       warn_parentheses = value;
       warn_return_type = value;
       warn_sequence_point = value;	/* Was C only.  */
       warn_switch = value;
       warn_sizeof_pointer_memaccess = value;
-      if (warn_strict_aliasing == -1)
-	set_Wstrict_aliasing (&global_options, value);
       warn_address = value;
-      if (warn_strict_overflow == -1)
-	warn_strict_overflow = value;
       warn_array_bounds = value;
       warn_volatile_register_var = value;
 
       /* Only warn about unknown pragmas that are not in system
 	 headers.  */
@@ -937,15 +934,10 @@ c_common_post_options (const char **pfil
   /* -Wpointer-sign is disabled by default, but it is enabled if any
      of -Wall or -Wpedantic are given.  */
   if (warn_pointer_sign == -1)
     warn_pointer_sign = 0;
 
-  if (warn_strict_aliasing == -1)
-    warn_strict_aliasing = 0;
-  if (warn_strict_overflow == -1)
-    warn_strict_overflow = 0;
-
   /* -Woverlength-strings is off by default, but is enabled by -Wpedantic.
      It is never enabled in C++, as the minimum limit is not normative
      in that standard.  */
   if (warn_overlength_strings == -1 || c_dialect_cxx ())
     warn_overlength_strings = 0;
Index: gcc/c-family/c-common.c
===================================================================
--- gcc/c-family/c-common.c	(revision 192379)
+++ gcc/c-family/c-common.c	(working copy)
@@ -1792,11 +1792,11 @@ strict_aliasing_warning (tree otype, tre
     {
       /* Casting the address of an object to non void pointer. Warn
          if the cast breaks type based aliasing.  */
       if (!COMPLETE_TYPE_P (TREE_TYPE (type)) && warn_strict_aliasing == 2)
 	{
-	  warning (OPT_Wstrict_aliasing, "type-punning to incomplete type "
+	  warning (OPT_Wstrict_aliasing_, "type-punning to incomplete type "
 		   "might break strict-aliasing rules");
 	  return true;
 	}
       else
         {
@@ -1807,18 +1807,18 @@ strict_aliasing_warning (tree otype, tre
           alias_set_type set2 = get_alias_set (TREE_TYPE (type));
 
           if (set1 != set2 && set2 != 0
 	      && (set1 == 0 || !alias_sets_conflict_p (set1, set2)))
 	    {
-	      warning (OPT_Wstrict_aliasing, "dereferencing type-punned "
+	      warning (OPT_Wstrict_aliasing_, "dereferencing type-punned "
 		       "pointer will break strict-aliasing rules");
 	      return true;
 	    }
           else if (warn_strict_aliasing == 2
 		   && !alias_sets_must_conflict_p (set1, set2))
 	    {
-	      warning (OPT_Wstrict_aliasing, "dereferencing type-punned "
+	      warning (OPT_Wstrict_aliasing_, "dereferencing type-punned "
 		       "pointer might break strict-aliasing rules");
 	      return true;
 	    }
         }
     }
@@ -1832,11 +1832,11 @@ strict_aliasing_warning (tree otype, tre
         alias_set_type set1 = get_alias_set (TREE_TYPE (otype));
         alias_set_type set2 = get_alias_set (TREE_TYPE (type));
         if (!COMPLETE_TYPE_P (type)
             || !alias_sets_must_conflict_p (set1, set2))
 	  {
-            warning (OPT_Wstrict_aliasing, "dereferencing type-punned "
+            warning (OPT_Wstrict_aliasing_, "dereferencing type-punned "
                      "pointer might break strict-aliasing rules");
             return true;
           }
       }
 
Index: gcc/fold-const.c
===================================================================
--- gcc/fold-const.c	(revision 192379)
+++ gcc/fold-const.c	(working copy)
@@ -267,11 +267,11 @@ fold_undefer_overflow_warnings (bool iss
 
   if (stmt == NULL)
     locus = input_location;
   else
     locus = gimple_location (stmt);
-  warning_at (locus, OPT_Wstrict_overflow, "%s", warnmsg);
+  warning_at (locus, OPT_Wstrict_overflow_, "%s", warnmsg);
 }
 
 /* Stop deferring overflow warnings, ignoring any deferred
    warnings.  */
 
@@ -303,11 +303,11 @@ fold_overflow_warning (const char* gmsgi
 	  fold_deferred_overflow_warning = gmsgid;
 	  fold_deferred_overflow_code = wc;
 	}
     }
   else if (issue_strict_overflow_warning (wc))
-    warning (OPT_Wstrict_overflow, gmsgid);
+    warning (OPT_Wstrict_overflow_, gmsgid);
 }
 
 /* Return true if the built-in mathematical function specified by CODE
    is odd, i.e. -f(x) == f(-x).  */
 
Index: gcc/testsuite/gcc.dg/Wstrict-overflow-24.c
===================================================================
--- gcc/testsuite/gcc.dg/Wstrict-overflow-24.c	(revision 0)
+++ gcc/testsuite/gcc.dg/Wstrict-overflow-24.c	(revision 0)
@@ -0,0 +1,10 @@
+/* { dg-do compile } */
+/* { dg-options "-fstrict-overflow -O2" } */
+/* { dg-message "warnings being treated as errors" "" {target "*-*-*"} 0 } */
+#pragma GCC diagnostic error "-Wstrict-overflow"
+
+int
+foo (int i)
+{
+  return __builtin_abs (i) >= 0; /* { dg-error "assuming signed overflow does not occur" "correct warning" } */
+}
Index: gcc/opts.c
===================================================================
--- gcc/opts.c	(revision 192379)
+++ gcc/opts.c	(working copy)
@@ -1449,20 +1449,10 @@ common_handle_option (struct gcc_options
     case OPT_Wstack_usage_:
       opts->x_warn_stack_usage = value;
       opts->x_flag_stack_usage_info = value != -1;
       break;
 
-    case OPT_Wstrict_aliasing:
-      set_Wstrict_aliasing (opts, value);
-      break;
-
-    case OPT_Wstrict_overflow:
-      opts->x_warn_strict_overflow = (value
-				      ? (int) WARN_STRICT_OVERFLOW_CONDITIONAL
-				      : 0);
-      break;
-
     case OPT_Wsystem_headers:
       dc->dc_warn_system_headers = value;
       break;
 
     case OPT_aux_info:
@@ -1793,26 +1783,10 @@ handle_param (struct gcc_options *opts, 
     }
 
   free (arg);
 }
 
-/* Used to set the level of strict aliasing warnings in OPTS,
-   when no level is specified (i.e., when -Wstrict-aliasing, and not
-   -Wstrict-aliasing=level was given).
-   ONOFF is assumed to take value 1 when -Wstrict-aliasing is specified,
-   and 0 otherwise.  After calling this function, wstrict_aliasing will be
-   set to the default value of -Wstrict_aliasing=level, currently 3.  */
-void
-set_Wstrict_aliasing (struct gcc_options *opts, int onoff)
-{
-  gcc_assert (onoff == 0 || onoff == 1);
-  if (onoff != 0)
-    opts->x_warn_strict_aliasing = 3;
-  else
-    opts->x_warn_strict_aliasing = 0;
-}
-
 /* The following routines are useful in setting all the flags that
    -ffast-math and -fno-fast-math imply.  */
 static void
 set_fast_math_flags (struct gcc_options *opts, int set)
 {
Index: gcc/optc-gen.awk
===================================================================
--- gcc/optc-gen.awk	(revision 192379)
+++ gcc/optc-gen.awk	(working copy)
@@ -46,30 +46,40 @@ for (i = 0; i < n_opts; i++) {
         } else {
             if (enables[enabledby_name] == "") {
                 enabledby[n_enabledby] = enabledby_name;
                 n_enabledby++;
             }
-            enables[enabledby_name] = enables[enabledby_name] opts[i] ",";
+            enables[enabledby_name] = enables[enabledby_name] opts[i] ";";
         }
     }
 
     enabledby_arg = opt_args("LangEnabledBy", flags[i]);
     if (enabledby_arg != "") {
         n_enabledby_arg_langs = split(nth_arg(0, enabledby_arg), enabledby_arg_langs, " ");
         enabledby_name = nth_arg(1, enabledby_arg);
+        enabledby_posarg = nth_arg(2, enabledby_arg)
+	enabledby_negarg = nth_arg(3, enabledby_arg)
         enabledby_index = opt_numbers[enabledby_name];
         if (enabledby_index == "") {
-            print "#error Enabledby: " enabledby_name 
+            print "#error LangEnabledby: " enabledby_name 
         } else {
+            if (enabledby_posarg != "" && enabledby_negarg != "") {
+                with_args = "," enabledby_posarg "," enabledby_negarg
+            } else if (enabledby_posarg == "" && enabledby_negarg == "") {
+                with_args = ""
+            } else {
+                print "#error LangEnabledBy with three arguments, it should have either 2 or 4"
+            }
+
             for (j = 1; j <= n_enabledby_arg_langs; j++) {
                 lang_name = lang_sanitized_name(enabledby_arg_langs[j]);
                 lang_index = lang_numbers[enabledby_arg_langs[j]];
                 if (enables[lang_name,enabledby_name] == "") {
                     enabledby[lang_name,n_enabledby_lang[lang_index]] = enabledby_name;
                     n_enabledby_lang[lang_index]++;
                 }
-                enables[lang_name,enabledby_name] = enables[lang_name,enabledby_name] opts[i] ",";
+                enables[lang_name,enabledby_name] = enables[lang_name,enabledby_name] opts[i] with_args ";";
             }
         }
     }
 }
 
@@ -386,11 +396,11 @@ print "                                 
 print "  switch (code)                                                       "
 print "    {                                                                 "
 for (i = 0; i < n_enabledby; i++) {
     enabledby_name = enabledby[i];
     print "    case " opt_enum(enabledby_name) ":"
-    n_enables = split(enables[enabledby_name], thisenable, ",");
+    n_enables = split(enables[enabledby_name], thisenable, ";");
     for (j = 1; j < n_enables; j++) {
         opt_var_name = var_name(flags[opt_numbers[thisenable[j]]]);
         if (opt_var_name != "") {
             print "      if (!opts_set->x_" opt_var_name ")"
             print "        handle_generated_option (opts, opts_set,"
@@ -429,20 +439,30 @@ for (i = 0; i < n_langs; i++) {
     print "    {                                                                 "
     
     for (k = 0; k < n_enabledby_lang[i]; k++) {
         enabledby_name = enabledby[lang_name,k];
         print "    case " opt_enum(enabledby_name) ":"
-        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]]]);
+        n_thisenable = split(enables[lang_name,enabledby_name], thisenable, ";");
+        for (j = 1; j < n_thisenable; j++) {
+            n_thisenable_args = split(thisenable[j], thisenable_args, ",");
+            if (n_thisenable_args == 1) {
+                thisenable_opt = thisenable[j];
+                value = "value";
+            } else {
+                thisenable_opt = thisenable_args[1];
+                with_posarg = thisenable_args[2];
+                with_negarg = thisenable_args[3];
+                value = "value ? " with_posarg " : " with_negarg;
+            }
+            opt_var_name = var_name(flags[opt_numbers[thisenable_opt]]);
             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 "                                 " opt_enum(thisenable_opt) ", NULL, " value ","
                 print "                                 lang_mask, kind, loc, handlers, dc);"
             } else {
-                print "#error " thisenable[j] " does not have a Var() flag"
+                print "#error " thisenable_opt " does not have a Var() flag"
             }
         }
         print "      break;\n"
     }
     print "    default:    "
Index: gcc/simplify-rtx.c
===================================================================
--- gcc/simplify-rtx.c	(revision 192379)
+++ gcc/simplify-rtx.c	(working copy)
@@ -5128,11 +5128,11 @@ simplify_const_relational_operation (enu
 		  || (!flag_wrapv && !flag_trapv && flag_strict_overflow)))
 	    {
 	      if (INTEGRAL_MODE_P (mode)
 		  && (issue_strict_overflow_warning
 		      (WARN_STRICT_OVERFLOW_CONDITIONAL)))
-		warning (OPT_Wstrict_overflow,
+		warning (OPT_Wstrict_overflow_,
 			 ("assuming signed overflow does not occur when "
 			  "assuming abs (x) < 0 is false"));
 	       return const0_rtx;
 	    }
 	  break;
@@ -5144,11 +5144,11 @@ simplify_const_relational_operation (enu
 		  || (!flag_wrapv && !flag_trapv && flag_strict_overflow)))
 	    {
 	      if (INTEGRAL_MODE_P (mode)
 	          && (issue_strict_overflow_warning
 	    	  (WARN_STRICT_OVERFLOW_CONDITIONAL)))
-	        warning (OPT_Wstrict_overflow,
+	        warning (OPT_Wstrict_overflow_,
 			 ("assuming signed overflow does not occur when "
 			  "assuming abs (x) >= 0 is true"));
 	      return const_true_rtx;
 	    }
 	  break;
Index: gcc/common.opt
===================================================================
--- gcc/common.opt	(revision 192379)
+++ gcc/common.opt	(working copy)
@@ -603,23 +603,23 @@ Warn when not issuing stack smashing pro
 Wstack-usage=
 Common Joined RejectNegative UInteger Var(warn_stack_usage) Init(-1) Warning
 Warn if stack usage might be larger than specified amount
 
 Wstrict-aliasing
-Common Warning
+Common Alias(Wstrict-aliasing=, 3, 0) Warning
 Warn about code which might break strict aliasing rules
 
 Wstrict-aliasing=
-Common Joined RejectNegative UInteger Var(warn_strict_aliasing) Init(-1) Warning
+Common Joined RejectNegative UInteger Var(warn_strict_aliasing) Warning
 Warn about code which might break strict aliasing rules
 
 Wstrict-overflow
-Common Warning
+Common Alias(Wstrict-overflow=, 2, 0) Warning
 Warn about optimizations that assume that signed overflow is undefined
 
 Wstrict-overflow=
-Common Joined RejectNegative UInteger Var(warn_strict_overflow) Init(-1) Warning
+Common Joined RejectNegative UInteger Var(warn_strict_overflow) Warning
 Warn about optimizations that assume that signed overflow is undefined
 
 Wsuggest-attribute=const
 Common Var(warn_suggest_attribute_const) Warning
 Warn about functions which might be candidates for __attribute__((const))
Index: gcc/tree-ssa-reassoc.c
===================================================================
--- gcc/tree-ssa-reassoc.c	(revision 192379)
+++ gcc/tree-ssa-reassoc.c	(working copy)
@@ -1932,11 +1932,11 @@ update_range_test (struct range_entry *r
 
   if (tem == NULL_TREE)
     return false;
 
   if (strict_overflow_p && issue_strict_overflow_warning (wc))
-    warning_at (loc, OPT_Wstrict_overflow,
+    warning_at (loc, OPT_Wstrict_overflow_,
 		"assuming signed overflow does not occur "
 		"when simplifying range test");
 
   if (dump_file && (dump_flags & TDF_DETAILS))
     {
