@@ -1,3 +1,10 @@
+2012-05-04 Dodji Seketeli <dodji@redhat.com>
+
+ Enable -Wunused-local-typedefs when -Wall or -Wunused is on
+ * opts.c (finish_options): Activate -Wunused-local-typedefs if
+ -Wunused is activated.
+ * doc/invoke.texi: Update blurb of -Wunused-local-typedefs.
+
2012-05-04 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
* config/s390/s390.md (*movmem_short, *clrmem_short)
@@ -3622,6 +3622,7 @@ To suppress this warning use the @samp{unused} attribute
@item -Wunused-local-typedefs @r{(C, Objective-C, C++ and Objective-C++ only)}
@opindex Wunused-local-typedefs
Warn when a typedef locally defined in a function is not used.
+This warning is enabled by @option{-Wall}.
@item -Wunused-parameter
@opindex Wunused-parameter
@@ -835,6 +835,10 @@ finish_options (struct gcc_options *opts, struct gcc_options *opts_set,
if (opts->x_warn_unused_value == -1)
opts->x_warn_unused_value = opts->x_warn_unused;
+ /* Wunused-local-typedefs is enabled by -Wunused or -Wall. */
+ if (opts->x_warn_unused_local_typedefs == -1)
+ opts->x_warn_unused_local_typedefs = opts->x_warn_unused;
+
/* This replaces set_Wextra. */
if (opts->x_warn_uninitialized == -1)
opts->x_warn_uninitialized = opts->x_extra_warnings;