[PATCH] restore -Wunused-variable on a typedef'd variable in a function template (PR 79548)

Martin Sebor msebor@gmail.com
Sat Feb 18 02:29:00 GMT 2017


The attached patch fixes bug 79548 - [5/6/7 Regression] missing
-Wunused-variable on a typedef'd variable in a function template,
most likely broken by the introduction of -Wunused-local-typedefs.

While testing the patch I came across a couple of other bugs:

   79585 - spurious -Wunused-variable on a pointer with attribute
           unused in function template
and

   79586 - missing -Wdeprecated depending on position of attribute

The test I added for 79548 fails two assertions due to the first
of these two so I xfailed them.  The second doesn't have an impact
on it.  Neither of these is a regression so I didn't try to fix them.

Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gcc-79548.diff
Type: text/x-patch
Size: 3721 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20170218/3418d21d/attachment.bin>


More information about the Gcc-patches mailing list