This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/56391] variable set but unused isn't reported. if it has been used prior to setting it to a new value.
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 19 Feb 2013 11:22:21 +0000
- Subject: [Bug c/56391] variable set but unused isn't reported. if it has been used prior to setting it to a new value.
- Auto-submitted: auto-generated
- References: <bug-56391-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56391
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
CC| |jakub at gcc dot gnu.org
Resolution| |INVALID
--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-02-19 11:22:21 UTC ---
The variable is used, so it isn't something -Wunused-but-set-parameter is meant
to warn for. That warning is emitted by the frontend, to warn in this case
you'd need to warn in the middle-end during dead code elimination or similar,
and it would have terrible ratio of false positives.