------- Comment #12 from mark at codesourcery dot com  2005-10-11 22:33 -------
Subject: Re:  [3.4/4.0/4.1 regression] Templates/non-templates
 and warnings about statements without effects

With the proposed patch, what happens with something like:

template <typename T>
void f() {
  T(); /* Has side-effects only if T is a class type.  */
}

In general, I'm concerned about warning only at template-declaration
time because I don't think we can be sure we can see all side effects at
that point.  I think it would be more reliable (and more consistent with
the overall approach in G++) to warn only in the instantiations.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=8057

Reply via email to