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: "mark at codesourcery dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 11 Oct 2005 22:46:10 -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 #14 from mark at codesourcery dot com 2005-10-11 22:46 -------
Subject: Re: [3.4/4.0/4.1 regression] Templates/non-templates
and warnings about statements without effects
ian at airs dot com wrote:
> ------- 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.
Yes, that's annoying -- but I think it's more accurate overall.
You should also feel free to argue with me; I'm not trying to be a dictator.
> I will submit a new patch.
Thanks.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=8057