Uploaded image for project: 'Embedded Software & Tools'
  1. Embedded Software & Tools
  2. EXT_EP-8759

wstring runtime failure - likely bug in swprintf

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Medium Medium
    • Code Generation Tools
    • CODEGEN-4290
    • Hide
      ARM_18.1.0.LTS
      C2000_22.6.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 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; }

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

              Created:
              Updated: