This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/8057] [3.4/4.0/4.1 regression] Templates/non-templates and warnings about statements without effects
- From: "ian at airs dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 11 Oct 2005 22:37:48 -0000
- Subject: [Bug c++/8057] [3.4/4.0/4.1 regression] Templates/non-templates and warnings about statements without effects
- References: <bug-8057-180@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #13 from ian at airs dot com 2005-10-11 22:37 -------
With your suggested test case, and my suggested patch, you will get the warning
foo.cc: In function ?void f()?:
foo.cc:3: warning: value computed is not used
It's easy to emit the warning only for template instantiations and not for
template declarations. That wasn't my first choice because it means that you
will get a warning each time the template is instantiated.
I will submit a new patch.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=8057