Index: libc/src/uchar/c16rtomb.cpp =================================================================== --- libc/src/uchar/c16rtomb.cpp +++ libc/src/uchar/c16rtomb.cpp @@ -22,16 +22,13 @@ if (c16 <= 0x7F) { StringSize = 1; - s = new char(StringSize); s[0] = c16 & 0x7F; } else if (c16 <= 0x7FF) { StringSize = 2; - s = new char(StringSize); s[0] = 0xC0 | (c16 & ((0x1F << 6) >> 6)); s[1] = 0x80 | (c16 & 0x3F); } else if (c16 <= 0xFFFF) { StringSize = 3; - s = new char(StringSize); s[0] = 0xE0 | (c16 & ((0x0F << 12) >> 12)); s[1] = 0x80 | (c16 & ((0x3F << 6) >> 6)); s[2] = 0x80 | (c16 & 0x3F); Index: libc/src/uchar/c32rtomb.cpp =================================================================== --- libc/src/uchar/c32rtomb.cpp +++ libc/src/uchar/c32rtomb.cpp @@ -18,22 +18,18 @@ size_t StringSize = 0; if (c32 <= 0x7F) { StringSize = 1; - s = new char(StringSize); s[0] = c32 & 0x7F; } else if (c32 <= 0x7FF) { StringSize = 2; - s = new char(StringSize); s[0] = 0xC0 | (c32 & ((0x1F << 6) >> 6)); s[1] = 0x80 | (c32 & 0x3F); } else if (c32 <= 0xFFFF) { StringSize = 3; - s = new char(StringSize); s[0] = 0xE0 | (c32 & ((0x0F << 12) >> 12)); s[1] = 0x80 | (c32 & ((0x3F << 6) >> 6)); s[2] = 0x80 | (c32 & 0x3F); } else if (c32 <= 0x10FFFF) { StringSize = 4; - s = new char(StringSize); s[0] = 0xF0 | (c32 & 0x1C0000) >> 18; s[1] = 0x80 | (c32 & 0x3F000) >> 12; s[2] = 0x80 | (c32 & 0xFC0) >> 6; Index: libc/src/uchar/mbrtoc16.cpp =================================================================== --- libc/src/uchar/mbrtoc16.cpp +++ libc/src/uchar/mbrtoc16.cpp @@ -42,11 +42,9 @@ if (Decoded <= 0xFFFF) { StringSize = 1; - pc16 = new char16_t(StringSize); pc16[0] = Decoded & 0xFFFF; } else if (Decoded <= 0x10FFFF) { StringSize = 2; - pc16 = new char16_t(StringSize); pc16[0] = 0xD800 + ((Decoded & 0xFFC00) >> 10); pc16[1] = 0xDC00 + (Decoded & 0x3FF); } Index: libc/src/uchar/mbrtoc32.cpp =================================================================== --- libc/src/uchar/mbrtoc32.cpp +++ libc/src/uchar/mbrtoc32.cpp @@ -17,7 +17,6 @@ const char *restrict s, size_t n, mbstate_t *restrict ps) { size_t StringSize = 1; - pc32 = new char32_t(StringSize); switch (n) { case 1: