aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-phiopt.c
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2019-05-04 15:35:33 +0100
committerJonathan Wakely <redi@gcc.gnu.org>2019-05-04 15:35:33 +0100
commit854a5c7722041c3c37ac68eca357bac225e58b88 (patch)
treed345f7c0c2d3d13cf33bd877b2e10ba9ddb45322 /gcc/tree-ssa-phiopt.c
parent2f7f1aca2959712d4d66f1409719a5bde871a626 (diff)
downloadgcc-854a5c7722041c3c37ac68eca357bac225e58b88.zip
gcc-854a5c7722041c3c37ac68eca357bac225e58b88.tar.gz
gcc-854a5c7722041c3c37ac68eca357bac225e58b88.tar.bz2
PR libstdc++/90299 make filesystem::absolute overloads consistent
In this implementation it is an error to pass the empty path to absolute, because the empty path doesn't represent any file in the filesystem so the function cannot meet its postcondition. Currently the absolute(const path&, error_code&) overload reports an error for the empty path, but using errc::no_such_file_or_directory, and the other overload does not report an error. This patch makes them consistntly report an errc::invalid_argument error for the empty path. PR libstdc++/90299 * src/c++17/fs_ops.cc (absolute(const path&)): Report an error if the argument is an empty path. (absolute(const path&, error_code&)): Use invalid_argument as error code instead of no_such_file_or_directory. * testsuite/27_io/filesystem/operations/absolute.cc: Check handling of non-existent paths and empty paths with both overloads of absolute. From-SVN: r270874
Diffstat (limited to 'gcc/tree-ssa-phiopt.c')
0 files changed, 0 insertions, 0 deletions