This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB 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/WIP] C/C++ wchar_t/Unicode printing support


On Thu, 15 Jan 2009, Tom Tromey wrote:

> * Handles input and output of wide characters and strings, and also
>   the new C0X u"" and U"" syntax.

(Of course, now C++0x has and C1x has accepted (not yet in a draft) a lot 
of further new string syntax that Jakub has implemented for GCC 4.5.)

If you handle input of the new string syntax, do you also handle the 
interesting concatenation issues?  "\xab" L"c" is a wide string with two 
characters, L'\xab' and L'c' (plus the trailing NUL); you do not interpret 
'\xab' as a member of the target narrow character set and convert to the 
target wide character set (nor do you interpret it as L"\xabc", with a 
single escape sequence), so you can't convert escape sequences to bytes of 
a string until after you know whether the final string is narrow or wide 
(or some other variant, in C++0x/C1x).

-- 
Joseph S. Myers
joseph@codesourcery.com


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