public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/64422] New: basic_string::erase is unresloved
@ 2014-12-28 5:37 bernd.edlinger at hotmail dot de
2014-12-28 5:54 ` [Bug c++/64422] " bernd.edlinger at hotmail dot de
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: bernd.edlinger at hotmail dot de @ 2014-12-28 5:37 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64422
Bug ID: 64422
Summary: basic_string::erase is unresloved
Product: gcc
Version: 5.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: bernd.edlinger at hotmail dot de
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.
Or if -std=gnu++11 is used.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/64422] basic_string::erase is unresloved
2014-12-28 5:37 [Bug c++/64422] New: basic_string::erase is unresloved bernd.edlinger at hotmail dot de
@ 2014-12-28 5:54 ` bernd.edlinger at hotmail dot de
2014-12-28 11:43 ` bernd.edlinger at hotmail dot de
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: bernd.edlinger at hotmail dot de @ 2014-12-28 5:54 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64422
--- Comment #1 from Bernd Edlinger <bernd.edlinger at hotmail dot de> ---
with -std=gnu++03 we get
call
_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5eraseEN9__gnu_cxx17__normal_iteratorIPKcS4_EES9_
aka 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> > >)
which is not in -lstdc++
but with -std=gnu++11 we get
call
_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5eraseEN9__gnu_cxx17__normal_iteratorIPcS4_EES8_
aka std::__cxx11::basic_string<char, std::char_traits<char>,
std::allocator<char> >::erase(__gnu_cxx::__normal_iterator<char const*,
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >
>, __gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> > >)
which is found in -lstdc++
so the difference is in the constness of the iterator parameters.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/64422] basic_string::erase is unresloved
2014-12-28 5:37 [Bug c++/64422] New: basic_string::erase is unresloved bernd.edlinger at hotmail dot de
2014-12-28 5:54 ` [Bug c++/64422] " bernd.edlinger at hotmail dot de
@ 2014-12-28 11:43 ` bernd.edlinger at hotmail dot de
2014-12-28 23:58 ` redi at gcc dot gnu.org
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: bernd.edlinger at hotmail dot de @ 2014-12-28 11:43 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64422
--- Comment #2 from Bernd Edlinger <bernd.edlinger at hotmail dot de> ---
Created attachment 34341
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34341&action=edit
Proposed Fix
this fixes string::erase(iterator, iterator)
and a few more templates that are missing as well.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/64422] basic_string::erase is unresloved
2014-12-28 5:37 [Bug c++/64422] New: basic_string::erase is unresloved bernd.edlinger at hotmail dot de
2014-12-28 5:54 ` [Bug c++/64422] " bernd.edlinger at hotmail dot de
2014-12-28 11:43 ` bernd.edlinger at hotmail dot de
@ 2014-12-28 23:58 ` redi at gcc dot gnu.org
2014-12-29 19:58 ` bernd.edlinger at hotmail dot de
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: redi at gcc dot gnu.org @ 2014-12-28 23:58 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64422
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |ASSIGNED
Last reconfirmed| |2014-12-28
Assignee|unassigned at gcc dot gnu.org |redi at gcc dot gnu.org
Target Milestone|--- |5.0
Ever confirmed|0 |1
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/64422] basic_string::erase is unresloved
2014-12-28 5:37 [Bug c++/64422] New: basic_string::erase is unresloved bernd.edlinger at hotmail dot de
` (2 preceding siblings ...)
2014-12-28 23:58 ` redi at gcc dot gnu.org
@ 2014-12-29 19:58 ` bernd.edlinger at hotmail dot de
2015-01-02 21:13 ` edlinger at gcc dot gnu.org
2015-01-02 21:14 ` bernd.edlinger at hotmail dot de
5 siblings, 0 replies; 7+ messages in thread
From: bernd.edlinger at hotmail dot de @ 2014-12-29 19:58 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64422
Bernd Edlinger <bernd.edlinger at hotmail dot de> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #34341|0 |1
is obsolete| |
--- Comment #3 from Bernd Edlinger <bernd.edlinger at hotmail dot de> ---
Created attachment 34358
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34358&action=edit
Proposed Fix
updated, with test case.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/64422] basic_string::erase is unresloved
2014-12-28 5:37 [Bug c++/64422] New: basic_string::erase is unresloved bernd.edlinger at hotmail dot de
` (3 preceding siblings ...)
2014-12-29 19:58 ` bernd.edlinger at hotmail dot de
@ 2015-01-02 21:13 ` edlinger at gcc dot gnu.org
2015-01-02 21:14 ` bernd.edlinger at hotmail dot de
5 siblings, 0 replies; 7+ messages in thread
From: edlinger at gcc dot gnu.org @ 2015-01-02 21:13 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64422
--- Comment #4 from Bernd Edlinger <edlinger at gcc dot gnu.org> ---
Author: edlinger
Date: Fri Jan 2 21:12:54 2015
New Revision: 219149
URL: https://gcc.gnu.org/viewcvs?rev=219149&root=gcc&view=rev
Log:
2015-01-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
PR libstdc++/64422
* src/c++98/misc-inst.cc (string::erase): Add missing overloads.
(string::insert): Likewise.
(string::replace): Likewise.
(wstring::erase): Likewise.
(wstring::insert): Likewise.
(wstring::replace): Likewise.
* testsuite/21_strings/basic_string/modifiers/64422.cc: New testcase.
Added:
trunk/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/64422.cc
Modified:
trunk/libstdc++-v3/ChangeLog
trunk/libstdc++-v3/src/c++98/misc-inst.cc
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/64422] basic_string::erase is unresloved
2014-12-28 5:37 [Bug c++/64422] New: basic_string::erase is unresloved bernd.edlinger at hotmail dot de
` (4 preceding siblings ...)
2015-01-02 21:13 ` edlinger at gcc dot gnu.org
@ 2015-01-02 21:14 ` bernd.edlinger at hotmail dot de
5 siblings, 0 replies; 7+ messages in thread
From: bernd.edlinger at hotmail dot de @ 2015-01-02 21:14 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64422
Bernd Edlinger <bernd.edlinger at hotmail dot de> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
--- Comment #5 from Bernd Edlinger <bernd.edlinger at hotmail dot de> ---
.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2015-01-02 21:14 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-28 5:37 [Bug c++/64422] New: basic_string::erase is unresloved bernd.edlinger at hotmail dot de
2014-12-28 5:54 ` [Bug c++/64422] " bernd.edlinger at hotmail dot de
2014-12-28 11:43 ` bernd.edlinger at hotmail dot de
2014-12-28 23:58 ` redi at gcc dot gnu.org
2014-12-29 19:58 ` bernd.edlinger at hotmail dot de
2015-01-02 21:13 ` edlinger at gcc dot gnu.org
2015-01-02 21:14 ` bernd.edlinger at hotmail dot de
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).