This is the mail archive of the gcc-patches@gcc.gnu.org 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: [PATCH] Revised: utf-16 and utf-32 support in C and C++


Kris Van Hees wrote:
The complications with wchar_t not being at least a 32-bit value is of
course that U"a" L"b" as a concatenation could have two interpretations:

	U"a" L"b"	-> U"ab" (if sizeof(char32_t> > sizeof(wchar_t))
	U"a" L"b"	-> L"ab" (if sizeof(char32_t> <= sizeof(wchar_t))

Would it be preferable to just not support additional concatenations like
this (to avoid the complication altogether), or is target specific behaviour
acceptable in cases like this?

I think my preference would be just not to support such concatenations, as the encoding for wchar_t will be different from the encoding for char16/32_t in most locales; I doubt that people will want to freely mix the two.


Jason


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