This is the mail archive of the mailing list for the GCC 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: Updated: [Patch, c* ,ObjC*] handle string objects in format checking.

> This is because the string literal behind an NS (or CF) string need  
> not be ascii or even utf8 -- it could be utf16 (although we haven't  
> implemented that yet).

Hmmm.  Excellent point by the way. ;-)

I still think we should do the NSString formatting in c-format.c.  I don't 
want to rewrite and maintain the whole of c-format.c in gcc/objc/. ;-)

[and in your patch you have another placeholder for CFString formatting in Darwin ... I
don't think we'd want to duplicate the entire printf formatting yet another time for 
Darwin just to allow CFStringRefs to be used instead of NSStrings ;-).]

We can probably find some sort of solution even for unicode strings.  
Probably ObjC could return the constant string converted to UTF-8 so that 
it can be fed into c-format.c without particular any changes to c-format.c ?

> In any event, have you any objection to first applying the syntax and  
> parsing logic - assuming Joseph is now happy with it (since that patch  
> is already reviewed twice) and then filling in the implementation?

No, I have no objection to doing it in two phases.  But it would make sense
to consider the second step when doing the first one. :-)


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