===================================================================
@@ -230,6 +230,10 @@ Wconversion-extra
Fortran Warning
Warn about most implicit conversions
+Wextra
+Fortran Warning
+Print extra (possibly unwanted) warnings
+
Wfunction-elimination
Fortran Warning
Warn about function call elimination
===================================================================
@@ -778,7 +778,8 @@ avoid such temporaries.
Warn if the a variable might not be C interoperable. In particular, warn if
the variable has been declared using an intrinsic type with default kind
instead of using a kind parameter defined for C interoperability in the
-intrinsic @code{ISO_C_Binding} module.
+intrinsic @code{ISO_C_Binding} module. This option is implied by
+@option{-Wall}.
@item -Wcharacter-truncation
@opindex @code{Wcharacter-truncation}
@@ -788,7 +789,8 @@ Warn when a character assignment will truncate the
@item -Wline-truncation
@opindex @code{Wline-truncation}
@cindex warnings, line truncation
-Warn when a source code line will be truncated.
+Warn when a source code line will be truncated. This option is
+implied by @option{-Wall}.
@item -Wconversion
@opindex @code{Wconversion}
@@ -884,7 +886,7 @@ encountered, which yield an UNDERFLOW during compi
Warn if a user-defined procedure or module procedure has the same name as an
intrinsic; in this case, an explicit interface or @code{EXTERNAL} or
@code{INTRINSIC} declaration might be needed to get calls later resolved to
-the desired intrinsic/procedure.
+the desired intrinsic/procedure. This option is implied by @option{-Wall}.
@item -Wunused-dummy-argument
@opindex @code{Wunused-dummy-argument}
@@ -939,6 +941,7 @@ allocatable variable; this includes scalars and de
@item -Wcompare-reals
@opindex @code{Wcompare-reals}
Warn when comparing real or complex types for equality or inequality.
+This option is implied by @option{-Wextra}.
@item -Wtarget-lifetime
@opindex @code{Wtargt-lifetime}
===================================================================
@@ -483,8 +483,15 @@ set_Wall (int setting)
warn_maybe_uninitialized = setting;
}
+/* Set the options for -Wextra. */
static void
+set_Wextra (int setting)
+{
+ gfc_option.warn_compare_reals = setting;
+}
+
+static void
gfc_handle_module_path_options (const char *arg)
{
@@ -653,6 +660,15 @@ gfc_handle_option (size_t scode, const char *arg,
gfc_option.warn_conversion_extra = value;
break;
+ case OPT_Wextra:
+ handle_generated_option (&global_options, &global_options_set,
+ OPT_Wunused_parameter, NULL, value,
+ gfc_option_lang_mask (), kind, loc,
+ handlers, global_dc);
+ set_Wextra (value);
+
+ break;
+
case OPT_Wfunction_elimination:
gfc_option.warn_function_elimination = value;
break;