[C++ PATCH] Fix 11945

Nathan Sidwell nathan@codesourcery.com
Tue Aug 19 16:26:00 GMT 2003


Hi,
this fixes 11945, were we were inconsistent about warning of sub
expressions with no effect. We'd warn on the template instantiations,
but not on the template definition itself, even though the
sub-expression was non-dependent. My recent patch to hold the
non-dependent expr as a NON_DEPENDENT_EXPR's operand propagates
TREE_SIDE_EFFECTS, and makes detection feasible.

booted & tested on i686-pc-linux-gnu, ok?

nathan
-- 
Nathan Sidwell    ::   http://www.codesourcery.com   ::     CodeSourcery LLC
          The voices in my head said this was stupid too
nathan@codesourcery.com    ::     http://www.planetfall.pwp.blueyonder.co.uk

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 11945.patch
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20030819/9f25ccf5/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 11945.C
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20030819/9f25ccf5/attachment-0001.ksh>


More information about the Gcc-patches mailing list