This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/8057] [3.4/4.0/4.1 regression] Templates/non-templates and warnings about statements without effects



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]