This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Patch for bug 23113
On Thu, 4 Aug 2005, James A. Morrison wrote:
>
> "Joseph S. Myers" <joseph@codesourcery.com> writes:
>
> > This patch fixes bug 23113, missing warnings from -Wunused-value
> > because of a too-general TREE_SIDE_EFFECTS check which stops the
> > warning when subexpressions have side-effects, e.g. "f() + 2;".
>
> Does this catch unused comparisons, e.g.
> int foo = 0;
> if (...)
> foo == f ();
It should.
--
Joseph S. Myers http://www.srcf.ucam.org/~jsm28/gcc/
jsm@polyomino.org.uk (personal mail)
joseph@codesourcery.com (CodeSourcery mail)
jsm28@gcc.gnu.org (Bugzilla assignments and CCs)