]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libstdc++: Add missing character to __to_wstring_numeric map
authorJonathan Wakely <jwakely@redhat.com>
Mon, 16 Dec 2024 09:45:40 +0000 (09:45 +0000)
committerJonathan Wakely <redi@gcc.gnu.org>
Wed, 18 Dec 2024 08:26:05 +0000 (08:26 +0000)
The mapping from char to wchar_t needs to handle 'i' and 'I' but those
were absent from the table that is used for some non-ASCII encodings.

libstdc++-v3/ChangeLog:

* include/bits/basic_string.h (__to_wstring_numeric): Add 'i'
and 'I' to mapping.

libstdc++-v3/include/bits/basic_string.h

index 8369c24d3ae3eed4bce189fc45e310ecb4e1ff9a..431ca486ddb671b5e003cac984e3eadcf2876d7c 100644 (file)
@@ -4575,6 +4575,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11
        __wc['d'] = L'd';
        __wc['e'] = L'e';
        __wc['f'] = L'f';
+       __wc['i'] = L'i'; // for "inf"
        __wc['n'] = L'n'; // for "nan" and "inf"
        __wc['p'] = L'p'; // for hexfloats "0x1p1"
        __wc['x'] = L'x';
@@ -4584,6 +4585,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11
        __wc['D'] = L'D';
        __wc['E'] = L'E';
        __wc['F'] = L'F';
+       __wc['I'] = L'I';
        __wc['N'] = L'N';
        __wc['P'] = L'P';
        __wc['X'] = L'X';