[cfe-dev] Patch for UCNs in string literals
public at alisdairm.net
Mon Jul 6 02:41:03 PDT 2009
> -----Original Message-----
> From: Eli Friedman [mailto:eli.friedman at gmail.com]
> Sent: 05 July 2009 12:45
> To: AlisdairM(public)
> Cc: clang-dev Developers
> Subject: Re: [cfe-dev] Patch for UCNs in string literals
> There are also working drafts available for C99, for example
> http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1336.pdf . That
> said, we don't have the C tests structured that way, and I'm not sure
> it's really worth the effort at this point, so just name it something
> reasonable and put it in with the existing tests.
Thanks. I just found n1362 which seems to be the latest draught. Do we have any plans for an experimental C1x mode yet? For example, I notice that this draught now has support for static_assert and Unicode types and literals.
Given we already implement static_assert for C++0x, I imagine it should be fairly easy to adapt for _Static_assert in C1x mode.
The Unicode characters give me more pause (which I am looking to implement for C++0x). The C standard does not spell out a specific name for these types, but defers them to uint_least_16/32_t. However, I believe the string literals are usable even when this header has not been included, and obviously those typedefs might resolve to different types on different platforms. What would be the best way to support this for C? I had originally thought that C defined two new types, _Char16_t and _Char32_t just as it introduces _Bool, but that does not seem to be the case.
On the subject of C testing of UCNs, where should I put this test? Does test/lexer/universal_char_name.c sound right?
Again, what should I do about the XFAIL wide-char tests? (other than implement the support ;¬)
More information about the cfe-dev