aboutsummaryrefslogtreecommitdiff
path: root/gcc/stack-ptr-mod.c
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2021-10-14 13:20:57 +0100
committerJonathan Wakely <jwakely@redhat.com>2021-10-14 15:12:34 +0100
commit5e3f88838994b67580594c4679c839fff7cdeba0 (patch)
tree7fdc4e3f4e8b4fa0e397147ea0844e5f8cff92c4 /gcc/stack-ptr-mod.c
parent3d95867ce6867239aa4ae69a9c82915660e1071d (diff)
downloadgcc-5e3f88838994b67580594c4679c839fff7cdeba0.zip
gcc-5e3f88838994b67580594c4679c839fff7cdeba0.tar.gz
gcc-5e3f88838994b67580594c4679c839fff7cdeba0.tar.bz2
libstdc++: Fix brainwrong in path::_S_convert(T) [PR102743]
This function was supposed to check whether the parameter's value type is the same as path::value_type, and therefore needs no conversion. Instead it checks whether the parameter is the same as its own value type, which is never true. This means we incorrectly return a string view for the case where T is path::string_type, instead of just returning the string itself. The only place that happens is path::_S_convert_loc for Windows, where we call _S_convert with a std::wstring rvalue. This fixes the condition in _S_convert(T). libstdc++-v3/ChangeLog: PR libstdc++/102743 * include/bits/fs_path.h (path::_S_convert(T)): Fix condition for returning the same string unchanged.
Diffstat (limited to 'gcc/stack-ptr-mod.c')
0 files changed, 0 insertions, 0 deletions