This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/14199] [tree-ssa regression] Unjustified warning about unused variable
- From: "bangerth at dealii dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 18 Feb 2004 22:04:19 -0000
- Subject: [Bug c++/14199] [tree-ssa regression] Unjustified warning about unused variable
- References: <20040218202459.14199.bangerth@dealii.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From bangerth at dealii dot org 2004-02-18 22:04 -------
Actually, when I extracted this small snippet, I didn't even really think
what it is about. The point is that the compiler really has some right
to say that the object is unused: the function we call is static, so the
object is really unused. It does make use to not issue the warning, though,
since the template may as well be instantiated for classes for which this
function is not static, and there is no good reason to show an warning message
in one, but not the other case. So, in a sense, a patch will have to
broaden the meaning of the word "unused"...
W.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14199