This is the mail archive of the
gcc-cvs@gcc.gnu.org
mailing list for the GCC project.
r259906 - in /branches/gcc-8-branch/libstdc++-v...
- From: redi at gcc dot gnu dot org
- To: gcc-cvs at gcc dot gnu dot org
- Date: Thu, 03 May 2018 19:53:42 -0000
- Subject: r259906 - in /branches/gcc-8-branch/libstdc++-v...
Author: redi
Date: Thu May 3 19:53:42 2018
New Revision: 259906
URL: https://gcc.gnu.org/viewcvs?rev=259906&root=gcc&view=rev
Log:
PR libstdc++/85632 fix wraparound in filesystem::space
On 32-bit targets any values over 4GB would wrap and produce the wrong
result.
PR libstdc++/85632 use uintmax_t for arithmetic
* src/filesystem/ops.cc (experimental::filesystem::space): Perform
arithmetic in result type.
* src/filesystem/std-ops.cc (filesystem::space): Likewise.
* testsuite/27_io/filesystem/operations/space.cc: Check total capacity
is greater than free space.
* testsuite/experimental/filesystem/operations/space.cc: New.
Added:
branches/gcc-8-branch/libstdc++-v3/testsuite/experimental/filesystem/operations/space.cc
- copied, changed from r259898, branches/gcc-8-branch/libstdc++-v3/testsuite/27_io/filesystem/operations/space.cc
Modified:
branches/gcc-8-branch/libstdc++-v3/ChangeLog
branches/gcc-8-branch/libstdc++-v3/src/filesystem/ops.cc
branches/gcc-8-branch/libstdc++-v3/src/filesystem/std-ops.cc
branches/gcc-8-branch/libstdc++-v3/testsuite/27_io/filesystem/operations/space.cc