This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] PR c++/33255 - Support -Wunused-local-typedefs warning
- From: Dodji Seketeli <dodji at redhat dot com>
- To: Jason Merrill <jason at redhat dot com>
- Cc: Paolo Carlini <paolo dot carlini at oracle dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 08 Sep 2011 23:54:42 +0200
- Subject: Re: [PATCH] PR c++/33255 - Support -Wunused-local-typedefs warning
- References: <m3r55bcumi.fsf@redhat.com> <4E325AAC.9010006@redhat.com> <m3ipql2x2v.fsf@redhat.com> <4E32E623.4090902@redhat.com> <m3obyurc7b.fsf@redhat.com> <4E692C9F.3040704@redhat.com>
Jason Merrill <jason@redhat.com> writes:
> On 09/08/2011 04:50 PM, Dodji Seketeli wrote:
>> Is this be OK for trunk when PR preprocessor/7263 gets in, assuming it
>> passes bootstrap and tests on trunk at that moment?
>
> Yes, except...
>
>> --- a/gcc/doc/invoke.texi
>> +++ b/gcc/doc/invoke.texi
>> @@ -3505,6 +3505,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}.
>
> Don't you want to say "This warning is also enabled by
> @option{-Wunused}, which is enabled by @option{-Wall}."?
For the sake of consistency, I followed the pattern used for the other
-Wunused-* options in that same file.
I thought I didn't have to mention that -Wunused triggers
-Wunused-local-typedefs because a bit below this, the text for -Wunused
reads:
All the above @option{-Wunused} options combined.
And before that, each relevant -Wunused-* option is said to be triggered
by -Wall, as I did.
I would also find your phrasing more logical, if it wasn't for the
consistency constraint.
--
Dodji