wstring runtime failure - likely bug in swprintf

XMLWordPrintable

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Medium
    • Code Generation Tools
    • CODEGEN-4290
    • Hide
      ARM_18.1.0.LTS
      C2000_22.6.0.LTS
      C2000_25.11.0.LTS
      ARM_18.12.0.LTS
      C2000_21.6.0.LTS
      ARM_20.2.0.LTS
      C2000_20.2.0.LTS
      Show
      ARM_18.1.0.LTS C2000_22.6.0.LTS C2000_25.11.0.LTS ARM_18.12.0.LTS C2000_21.6.0.LTS ARM_20.2.0.LTS C2000_20.2.0.LTS

      wstring runtime failure - likely bug in swprintf

      The following test fails:
      #include <cstdlib>
      #include <cwchar>
      #include <string>
      #include <limits>

      void compare(long long i) {
      std::wstring g = std::to_wstring;
      wchar_t buf[200];
      std::swprintf(buf, 200, L"%lld", i);
      std::wstring x(buf);
      if (g != x)

      { printf("Got %s instead of %s\n", g.c_str(), x.c_str()); }

      }

      int main( void )

      { compare(0); return 1; }

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

              Created:
              Updated:

                Connection: Intermediate to External PROD System
                EXTSYNC-1262 - wstring runtime failure - likely bu...
                SYNCHRONIZED
                • Last Sync Date: