public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/53322] New: Wunused-local-typedefs is not enabled by Wall or Wunused
@ 2012-05-11 12:31 manu at gcc dot gnu.org
2012-05-11 12:36 ` [Bug c++/53322] " manu at gcc dot gnu.org
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: manu at gcc dot gnu.org @ 2012-05-11 12:31 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53322
Bug #: 53322
Summary: Wunused-local-typedefs is not enabled by Wall or
Wunused
Classification: Unclassified
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: manu@gcc.gnu.org
Since warn_unused_local_typedefs is never -1, then it is never enabled by
Wunused.
The fix is:
Index: gcc/c-family/c.opt
===================================================================
--- gcc/c-family/c.opt (revision 187385)
+++ gcc/c-family/c.opt (working copy)
@@ -672,11 +672,11 @@ Warn about unrecognized pragmas
Wunsuffixed-float-constants
C ObjC Var(warn_unsuffixed_float_constants) Warning
Warn about unsuffixed float constants
Wunused-local-typedefs
-C ObjC C++ ObjC++ Var(warn_unused_local_typedefs) Warning
+C ObjC C++ ObjC++ Var(warn_unused_local_typedefs) Warning EnabledBy(Wunused)
Warn when typedefs locally defined in a function are not used
Wunused-macros
C ObjC C++ ObjC++ Warning
Warn about macros defined in the main file that are not used
But I am sure this will trigger some warnings.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/53322] Wunused-local-typedefs is not enabled by Wall or Wunused
2012-05-11 12:31 [Bug c++/53322] New: Wunused-local-typedefs is not enabled by Wall or Wunused manu at gcc dot gnu.org
@ 2012-05-11 12:36 ` manu at gcc dot gnu.org
2012-05-15 17:35 ` dodji at gcc dot gnu.org
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: manu at gcc dot gnu.org @ 2012-05-11 12:36 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53322
Manuel López-Ibáñez <manu at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |dodji at gcc dot gnu.org
--- Comment #1 from Manuel López-Ibáñez <manu at gcc dot gnu.org> 2012-05-11 12:31:11 UTC ---
CCing Dodji.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/53322] Wunused-local-typedefs is not enabled by Wall or Wunused
2012-05-11 12:31 [Bug c++/53322] New: Wunused-local-typedefs is not enabled by Wall or Wunused manu at gcc dot gnu.org
2012-05-11 12:36 ` [Bug c++/53322] " manu at gcc dot gnu.org
@ 2012-05-15 17:35 ` dodji at gcc dot gnu.org
2012-05-22 5:12 ` dodji at gcc dot gnu.org
2012-05-24 18:38 ` dodji at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: dodji at gcc dot gnu.org @ 2012-05-15 17:35 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53322
Dodji Seketeli <dodji at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |ASSIGNED
Last reconfirmed| |2012-05-15
AssignedTo|unassigned at gcc dot |dodji at gcc dot gnu.org
|gnu.org |
Ever Confirmed|0 |1
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/53322] Wunused-local-typedefs is not enabled by Wall or Wunused
2012-05-11 12:31 [Bug c++/53322] New: Wunused-local-typedefs is not enabled by Wall or Wunused manu at gcc dot gnu.org
2012-05-11 12:36 ` [Bug c++/53322] " manu at gcc dot gnu.org
2012-05-15 17:35 ` dodji at gcc dot gnu.org
@ 2012-05-22 5:12 ` dodji at gcc dot gnu.org
2012-05-24 18:38 ` dodji at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: dodji at gcc dot gnu.org @ 2012-05-22 5:12 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53322
--- Comment #2 from Dodji Seketeli <dodji at gcc dot gnu.org> 2012-05-22 03:50:36 UTC ---
Author: dodji
Date: Tue May 22 03:50:26 2012
New Revision: 187757
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=187757
Log:
PR c++/53322 - -Wunused-local-typedefs is not enabled by Wall or Wunused
As the audit trail of this shows, -Wunused-local-typedefs is not
turned on by -Wunused after all. Sigh.
Now that we have the EnabledBy construct for the *.opt files, it's
more precise and concise to use that to make -Wunused-local-typedefs
be triggered by -Wunused.
I have changed the gcc+.dg/warn/Wunused-local-typedefs.C test case to
make it use -Wunused instead of -Wunused-local-typedefs. I had to
adjust it to avoid the warnings due to the other -W* options triggered
by -Wunused there.
While testing the compiler, it turned out that some local typedefs
were not being used when the experimental "Concepts" support is turned
off, in the libstdc++ test suite. I also had to remove some obvious
useless local typedef usage in the fortran front-end. Fixed thus.
Bootstrapped and tested on x86_64-unknown-linux-gnu against trunk.
gcc/c-family/
PR c++/53322
* c.opt (Wunused-local-typedefs): Use EnabledBy(Wunused).
libstdc++-v3/
PR c++/53322
* include/bits/stl_algobase.h (lower_bound)
(lexicographical_compare): Do not declare unused local typedefs
here when Concepts are turned off.
gcc/fortran/
PR c++/53322
* f95-lang.c (gfc_init_builtin_functions): Remove the unused
typedef builtin_type.
gcc/testsuite/
PR c++/53322
* g++.dg/warn/Wunused-local-typedefs.C: Adjust to use -Wunused
instead of -Wunused-local-typedefs.
Modified:
trunk/gcc/c-family/ChangeLog
trunk/gcc/c-family/c.opt
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/f95-lang.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/g++.dg/warn/Wunused-local-typedefs.C
trunk/libstdc++-v3/ChangeLog
trunk/libstdc++-v3/include/bits/stl_algobase.h
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/53322] Wunused-local-typedefs is not enabled by Wall or Wunused
2012-05-11 12:31 [Bug c++/53322] New: Wunused-local-typedefs is not enabled by Wall or Wunused manu at gcc dot gnu.org
` (2 preceding siblings ...)
2012-05-22 5:12 ` dodji at gcc dot gnu.org
@ 2012-05-24 18:38 ` dodji at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: dodji at gcc dot gnu.org @ 2012-05-24 18:38 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53322
Dodji Seketeli <dodji at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
--- Comment #3 from Dodji Seketeli <dodji at gcc dot gnu.org> 2012-05-24 18:06:09 UTC ---
Fixed in trunk (4.8).
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-05-24 18:06 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-11 12:31 [Bug c++/53322] New: Wunused-local-typedefs is not enabled by Wall or Wunused manu at gcc dot gnu.org
2012-05-11 12:36 ` [Bug c++/53322] " manu at gcc dot gnu.org
2012-05-15 17:35 ` dodji at gcc dot gnu.org
2012-05-22 5:12 ` dodji at gcc dot gnu.org
2012-05-24 18:38 ` dodji at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).