This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [PATCH] Fix libstdc++/5579
- From: Paolo Carlini <pcarlini at unitus dot it>
- To: Nathan Myers <ncm-nospam at cantrip dot org>
- Cc: libstdc++ at gcc dot gnu dot org
- Date: Sun, 03 Feb 2002 20:47:14 +0100
- Subject: Re: [PATCH] Fix libstdc++/5579
- References: <3C5D5D0C.6C4D4E38@unitus.it> <20020203193004.A6844@cantrip.org>
Nathan Myers wrote:
> Can you give examples of formats and sequences that fail, where
> you're not sure if they should?
>
> In general, at the place in the format where it says the symbol
> should be, it should expect to find either the first character
> of the symbol, or the first character of the next component of the
> format. If the symbol is the last thing in the format (really the
> last thing, no "rest of the sign" left to read) then if it's optional
> you don't try to read it.
While we are at it, another thing which occurs to me reading your reply.
In my second fix (which I think is much closer to the correct one) if it's
optional (that is "charbase" is false) I don't try to read the symbol if its the
last in the format but also if it's but last and the following field has value
"none". This latter case should not be considered, right?
Thanks,
Paolo.