Cannot use char16_t for 16-bit wide string literals

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: Medium

      % type file.c
      #include <uchar.h>
      #include <stdint.h>
      const char16_t fails[] = u"utf-16 string literal";
      
      % cl2000 --c11 file.c
      "file.c", line 3: error: a value of type "unsigned short [22]" cannot be used to initialize an entity of type "const char16_t []"
      1 error detected in the compilation of "file.c".
      
      >> Compilation failure
      

      Change char16_t to unsigned short, and it works.

            Assignee:
            TI User
            Reporter:
            TI User
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                Connection: Intermediate to External PROD System
                EXTSYNC-5869 - Cannot use char16_t for 16-bit wide...
                SYNCHRONIZED
                • Last Sync Date: