[Bug preprocessor/94168] [10 Regression] error: extended character § is not valid in an identifier since r10-3309-g7d112d6670a0e0e6
marxin at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Mar 16 08:06:52 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94168
--- Comment #4 from Martin Liška <marxin at gcc dot gnu.org> ---
Thank you for the analysis and suggested patch.
The original source code looks like this:
#ifdef WINDOWS
static std::string wide_string_to_string(const std::wstring & wstr)
{
int size_needed = WideCharToMultiByte(CP_UTF8, 0, &wstr[0],
(int)§wstr.size(), NULL, 0, NULL, NULL);
std::string str( size_needed, 0 );
WideCharToMultiByte(CP_UTF8, 0, &wstr[0], (int)wstr.size(), &str[0],
size_needed, NULL, NULL);
return str;
}
#endif
More information about the Gcc-bugs
mailing list