[cfe-dev] [PATCH] C++0x unicode string and character literals now with test cases
dgregor at apple.com
Mon Jul 25 21:16:03 PDT 2011
On Jul 25, 2011, at 6:45 PM, Sean Hunt wrote:
> On Mon, Jul 25, 2011 at 18:36, Craig Topper <craig.topper at gmail.com> wrote:
>> As far as the const conversion for the new string literal types, gcc
>> 4.5.2 allows it and throws a warning. Looks like the standard may
>> consider these cases to be illegal now instead of deprecated for even
>> the old cases.
>> Google found this page which documents discussion on this topic. Look
>> for "693. New string types and deprecated conversion "
> I think we should follow the CWG's direction here. The reason it was
> not added, even as a deprecated conversion, was to avoid people
> relying on a brand new deprecated conversion which would make it more
> difficult to remove later when it could have been nipped in the bud.
> So for consistency, the deprecated conversion for char* was removed.
> In my opinion, given that the committee decided on this specific
> issue, we should follow the committee's direction and reject this
> conversion, certainly for the new types but probably char* as well
> given the committee's explicit decision in that regard (and update the
> compatibility docs).
I have a sinking feeling that rejecting the string literal to char* conversion is going to break a lot of existing code. We'll have to do it eventually, but we'll need *excellent* recovery when we do.
More information about the cfe-dev