This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] std::quoted is too eager to clear the string
- From: Jonathan Wakely <jwakely dot gcc at gmail dot com>
- To: Lars Gullik BjÃnnes <larsbj at gullik dot org>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>, "libstdc++" <libstdc++ at gcc dot gnu dot org>
- Date: Fri, 21 Feb 2014 00:13:59 +0000
- Subject: Re: [PATCH] std::quoted is too eager to clear the string
- Authentication-results: sourceware.org; auth=none
- References: <m38ut5qqr6 dot fsf at black dot gullik dot net>
On 21 February 2014 00:00, Lars Gullik BjÃnnes wrote:
>
> * include/std/iomanip (_Quoted_string operator>>): Do not clear
> string if input is not quoted.
>
> Currently the string is cleared regardless of
> how the string is handled. This patch just
> moves the clearing down so that we do not clear
> it if we are not going to quote the string
> (i.e. let operator>> handle the clearing if needed)
> and also not if we encounter any stream error.
>
> This has been reported as (bug 60270).
>
> I have no GCC paperwork in order, but I expect this change
> to be simple enough to not require that.
I agree, and we already have a testcase in the PR I opened.
I'll commit this for 4.9.1, thanks for reporting and fixing it.