Stop print_hex from printing bits above the precision
commitbf39e18e70018ba12b3d24ea3295ea1ca0e4a487
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 26 Oct 2017 16:09:17 +0000 (26 16:09 +0000)
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 26 Oct 2017 16:09:17 +0000 (26 16:09 +0000)
tree8520bb6366825f7c10916bd90242062701968241
parent36bc3d02e10f44da19157ce3d1ee2b9f7169bb10
Stop print_hex from printing bits above the precision

2017-10-26  Richard Sandiford  <richard.sandiford@linaro.org>

gcc/
* wide-int-print.cc (print_hex): Loop based on extract_uhwi.
Don't print any bits outside the precision of the value.
* wide-int.cc (test_printing): Add some new tests.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@254109 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/wide-int-print.cc
gcc/wide-int.cc