[Patch] Fix some problems with _M_extract_via_format
Paolo Carlini
pcarlini@suse.de
Wed Dec 17 18:52:00 GMT 2003
Hi,
these are very long standing problems:
1- At the beginning we were assigning to the char __c
an element of __format[], an array of _CharTs.
2- At the end we were comparing a narrowed *__beg to
the char __c above. This branch is taken when in
fact __c != '%', therefore, the corresponding
__format[] element can be any possible char!
The first issue by itself is mostly about type-correctness:
it's unlikely to give problems in practice since __c is
first compared to values in the basic execution character
set (e.g., 'a', 'A', 'h', 'b', ...)
The latter impacts more heavily actual code, as soon as
a wchar_t __format actually contains "exotic" characters,
I have prepared a testcase for this.
Tested x86-linux.
Paolo.
//////////////
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: CL_evf
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20031217/31d3b296/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patch_evf
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20031217/31d3b296/attachment-0001.ksh>
More information about the Libstdc++
mailing list