This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix libstdc++/5579


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.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]