Re: Bug#995916: std::stoi, std::stol, std::stoul, ... broken on sh4

John Paul Adrian Glaubitz <[email protected]> Fri, 8 Oct 2021 11:21:54 +0200
Newsgroups gmane.linux.debian.ports.superh
Message-ID <[email protected]>
Hi Mattias!

On 10/8/21 09:54, Mattias Ellert wrote:
> The std::stoi, std::stol, std::stoul, ... functions should be available
> in two versions. One accepting a std::string and one accepting a
> std::wstring.
> 
> In g++ version 10.3.0-11 on sh4 only the std::wstring version is
> available, so when it tries to compile code that uses the std::string
> version it fails.
> 
> The problem is that for some reason the the file
> 
> /usr/include/sh4-linux-gnu/c++/10/bits/c++config.h
> 
> provided by libstdc++-10-dev_10.3.0-11_sh4.deb contains the line
> 
> /* #undef _GLIBCXX11_USE_C99_STDLIB */
> 
> The corresponding file for other architectures contains
> 
> #define _GLIBCXX11_USE_C99_STDLIB 1
> 
> This is a regression wrt earlier versions, since this used to work
> without problems.

Thanks so much for tracking this down. I have seen this issue before and
didn't understand what the problem was. At least I do now.

I will try to build cmake with gcc-11 and see if that makes any difference.

Adrian