------- Comment #3 from redi at gcc dot gnu dot org  2009-12-11 00:37 -------
This would have prevented bugs I've dealt with where critical sections where
not protected:
{
  lock_guard (mutex);
  // mutex NOT locked here!
}

But I'm not convinced that doing this is always a mistake. Would the warning be
suppressed by casting to void?

  (void) TypeWithSideEffectsInCtor(x);


-- 

redi at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |redi at gcc dot gnu dot org


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

Reply via email to