Re: PR libstdc++/90945 Patch to have pretty printer for std::vector return bool intead of int for elements

2019-06-20 Thread Jonathan Wakely
On 20/06/19 08:12 +0200, Stephan Bergmann wrote: On 19/06/2019 21:54, Jonathan Wakely wrote: On 19/06/19 21:49 +0200, Michael Weghorn wrote: On 19/06/2019 21.37, Jonathan Wakely wrote: +  std::vector vb; +  vb.reserve(100); +  vb.push_back(true); +  vb.push_back(true); +  vb.push_back(false);

Re: PR libstdc++/90945 Patch to have pretty printer for std::vector return bool intead of int for elements

2019-06-20 Thread Stephan Bergmann
On 19/06/2019 21:54, Jonathan Wakely wrote: On 19/06/19 21:49 +0200, Michael Weghorn wrote: On 19/06/2019 21.37, Jonathan Wakely wrote: +  std::vector vb; +  vb.reserve(100); +  vb.push_back(true); +  vb.push_back(true); +  vb.push_back(false); +  vb.push_back(false); +  vb.push_back(true); + 

Re: PR libstdc++/90945 Patch to have pretty printer for std::vector return bool intead of int for elements

2019-06-19 Thread Jonathan Wakely
On 19/06/19 21:58 +0200, Michael Weghorn wrote: On 19/06/2019 21.54, Jonathan Wakely wrote: +  std::vector vb; +  vb.reserve(100); +  vb.push_back(true); +  vb.push_back(true); +  vb.push_back(false); +  vb.push_back(false); +  vb.push_back(true); +  vb.erase(vb.begin()); +// { dg-final {

Re: PR libstdc++/90945 Patch to have pretty printer for std::vector return bool intead of int for elements

2019-06-19 Thread Michael Weghorn
On 19/06/2019 21.54, Jonathan Wakely wrote: >>> +  std::vector vb; >>> +  vb.reserve(100); >>> +  vb.push_back(true); >>> +  vb.push_back(true); >>> +  vb.push_back(false); >>> +  vb.push_back(false); >>> +  vb.push_back(true); >>> +  vb.erase(vb.begin()); >>> +// { dg-final { regexp-test vb

Re: PR libstdc++/90945 Patch to have pretty printer for std::vector return bool intead of int for elements

2019-06-19 Thread Jonathan Wakely
On 19/06/19 21:49 +0200, Michael Weghorn wrote: Thank you for the quick reply! On 19/06/2019 21.37, Jonathan Wakely wrote: Thanks, the patch looks fine and is small enough that we can accept it without a copyright assignment, but if you plan to contribute again you should look into

Re: PR libstdc++/90945 Patch to have pretty printer for std::vector return bool intead of int for elements

2019-06-19 Thread Michael Weghorn
Thank you for the quick reply! On 19/06/2019 21.37, Jonathan Wakely wrote: > Thanks, the patch looks fine and is small enough that we can accept it > without a copyright assignment, but if you plan to contribute again > you should look into https://gcc.gnu.org/contribute.html#legal I'll do as

Re: PR libstdc++/90945 Patch to have pretty printer for std::vector return bool intead of int for elements

2019-06-19 Thread Jonathan Wakely
On 19/06/19 19:04 +0200, Michael Weghorn wrote: Hi everyone, the Python pretty printer for a 'std::vector' currently returns integers as values for the elements, which e.g. leads to the situation that a 'gdb.Value' constructed from that doesn't have 'bool' type, but an integer type ('long long'

PR libstdc++/90945 Patch to have pretty printer for std::vector return bool intead of int for elements

2019-06-19 Thread Michael Weghorn
Hi everyone, the Python pretty printer for a 'std::vector' currently returns integers as values for the elements, which e.g. leads to the situation that a 'gdb.Value' constructed from that doesn't have 'bool' type, but an integer type ('long long' for my test with gdb 8.2.1 on Debian testing,