aboutsummaryrefslogtreecommitdiff
path: root/gcc/config.gcc
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2018-10-09 14:06:46 +0100
committerJonathan Wakely <redi@gcc.gnu.org>2018-10-09 14:06:46 +0100
commit33b43b0d8cd2de722d177ef823930500948a7487 (patch)
treefe52c12f4745d6dc6e912bdf1181fc9c1d0aec2d /gcc/config.gcc
parentfe8a86e1f445c4f97c06ddc36ce68ca40627a1cc (diff)
downloadgcc-33b43b0d8cd2de722d177ef823930500948a7487.zip
gcc-33b43b0d8cd2de722d177ef823930500948a7487.tar.gz
gcc-33b43b0d8cd2de722d177ef823930500948a7487.tar.bz2
Define std::string and related typedefs outside __cxx11 namespace
The typedefs for common specializations of std::__cxx11::basic_string do not need to be in the std::__cxx11 namespace. Those typedefs are never used for linkage purposes so don't appear in mangled names, and so don't need to be distinct from the equivalent typedefs for the COW std::basic_string specializations. It is OK for the same typedef to refer to different types in different translation units. Defining them directly in namespace std improves diagnostics that use those typedefs. For example: error: could not convert '1' from 'int' to 'std::__cxx11::string' {aka 'std::__cxx11::basic_string<char>'} will now be printed as: error: could not convert '1' from 'int' to 'std::string' {aka 'std::__cxx11::basic_string<char>'} The precise type is still shown, but the typedef is not obfuscated with the inline namespace. * include/bits/stringfwd.h (string, wstring, u16string, u32string): Define typedefs outside of __cxx11 inline namespace. * python/libstdcxx/v6/printers.py (register_type_printers): Also register printers for typedefs in new location. From-SVN: r264958
Diffstat (limited to 'gcc/config.gcc')
0 files changed, 0 insertions, 0 deletions