This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: libcpp/charset: close out shift states
- From: Tom Tromey <tromey at redhat dot com>
- To: DJ Delorie <dj at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 10 Dec 2007 11:25:37 -0700
- Subject: Re: libcpp/charset: close out shift states
- References: <200712062019.lB6KJqeE001748@greed.delorie.com>
- Reply-to: tromey at redhat dot com
>>>>> "DJ" == DJ Delorie <dj@redhat.com> writes:
DJ> + /* Close out any shift states, returning to the initial state. */
DJ> + if (iconv (cd, 0, 0, &outbuf, &outbytesleft) == (size_t)-1)
DJ> + return false;
What if this new iconv call returns -1 with errno==E2BIG? In this
case, we will return false -- but I think what we really want to do is
resize the output buffer and try again.
I think with a change to fix this problem, this is ok.
Tom