This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] New std::string implementation
- From: Bernd Edlinger <bernd dot edlinger at hotmail dot de>
- To: Jonathan Wakely <jwakely at redhat dot com>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 23 Dec 2014 21:22:25 +0100
- Subject: Re: [patch] New std::string implementation
- Authentication-results: sourceware.org; auth=none
Hello Jonathan,
starting with around r218964, "New std::string implementation."
the following program does no longer link correctly:
cat test1.cc
#include <string>
int
main()
{
std::string x;
x.erase(x.begin(), x.end());
}
g++ test1.cc
/tmp/ccgup1FU.o: In function `main':
test1.cc:(.text+0x41): undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>::erase(__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, __gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>)'
collect2: error: ld returned 1 exit status
This does however not happen at -O1 and above.
Any ideas?
Thanks,
Bernd.