This is the mail archive of the
mailing list for the GCC project.
Re: Updated: [Patch, c* ,ObjC*] handle string objects in format checking.
On 1 Nov 2010, at 13:13, Joseph S. Myers wrote:
On Mon, 1 Nov 2010, Nicola Pero wrote:
Probably ObjC could return the constant string converted to UTF-8
it can be fed into c-format.c without particular any changes to c-
What's really wanted - to do wide string format checking for wprintf
(bug 38308), not just for ObjC - are separate accessors / iterators
in the narrow string case extract a byte, or a multibyte character,
string. (C format strings are complicated mixtures of bytes and
characters.) In the wide string case both would just end up
single wide character. It would be strongly desirable to have a
for string access that is not specific to format checking but can be
everywhere else that looks at contents of strings. (All such
optimizations - folding, built-in functions, etc. - ought to work
on narrow and wide strings; I don't think they do at present.)
I will no longer ask that such changes actually define the formats for
strings for non-8-bit-bytes as I did previously, and rather too
forcefully, in response to
<http://gcc.gnu.org/ml/gcc-patches/2001-12/msg01579.html>. As long
set up central infrastructure for iterating over strings it will be
significantly easier for anyone adding such a target in future to
things in one place and fix other places to use the common
Nor will I ask that the character set issues (bugs 20110 and 33748)
necessarily be fixed at the same time.
This looks like something beyond 4.6?
Can I ask what the position is on the original patch which sets out to
check syntax and deal with two string formats which are, essentially,
outside our control?
[although the basic layout and capability of CFString might well
satisfy the objectives for a common string container above, and is
part of the FSF code-base]