This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/55239] Spurious "unused variable" warning on function-local objects with a destructor and an initializer
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 08 Nov 2012 14:46:56 +0000
- Subject: [Bug c++/55239] Spurious "unused variable" warning on function-local objects with a destructor and an initializer
- Auto-submitted: auto-generated
- References: <bug-55239-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55239
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |diagnostic
Status|UNCONFIRMED |NEW
Last reconfirmed| |2012-11-08
Ever Confirmed|0 |1
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-11-08 14:46:56 UTC ---
Yes, annoying.
Giving the type a user-defined constructor makes the warning go away. A
user-defined destructor should have the same effect.