PATCH: fix warning in libstdc++/src/strstream.cc
Ian Lance Taylor
iant@google.com
Fri Jan 5 02:30:00 GMT 2007
Ben Elliston <bje@au1.ibm.com> writes:
> This new warning popped up as a result of some diagnostics work that I
> think I saw mentioned in list traffic. Committed as obvious.
>
> 2007-01-05 Ben Elliston <bje@au.ibm.com>
>
> * src/strstream.cc (strstreambuf::seekoff): Add parentheses around
> truth expression to eliminate a new warning from g++.
>
> Index: src/strstream.cc
> ===================================================================
> --- src/strstream.cc (revision 120450)
> +++ src/strstream.cc (working copy)
> @@ -235,7 +235,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
> if ((mode & (ios_base::in | ios_base::out))
> == (ios_base::in | ios_base::out) &&
> (dir == ios_base::beg || dir == ios_base::end))
> - do_get = do_put = true;
> + do_get = (do_put = true);
> else if (mode & ios_base::in)
> do_get = true;
> else if (mode & ios_base::out)
I thought I understood this, but I don't. I don't get a warning about
this file. I can't come up with a similar test case which causes a
warning.
Can you recreate this problem? Can you send me the .ii file?
Ian
More information about the Libstdc++
mailing list