This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/29696] std::string::reverse_iterator doesn't work at all on Tru64 UNIX
- From: "lebedev at zhtw dot org dot ru" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 3 Nov 2006 15:29:34 -0000
- Subject: [Bug libstdc++/29696] std::string::reverse_iterator doesn't work at all on Tru64 UNIX
- References: <bug-29696-13510@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #3 from lebedev at zhtw dot org dot ru 2006-11-03 15:29 -------
(In reply to comment #2)
> Indeed, we badly need details. The correct output (which indeed I can see on
> any machine I have at hand, any version of gcc) is:
> 0 9 8 7 6 5 4 3 2 1 1 2 3 1 2 3
> 3 2 1 3 2 1 1 2 3 4 5 6 7 8 9 0
>
This works well for me too on i386 freebsd-6.2-prerelease.
But this happens under Tru64:
avl@axp3:~$ uname -a
OSF1 axp3.umc8.mai.ru V5.1 2650 alpha
avl@axp3:~$ g++ --version
g++ (GCC) 3.4.6
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
avl@axp3:~$ cat demo.cpp
#include <iostream>
#include <algorithm>
#include <iterator>
#include <string>
int main()
{
std::string s = "0123456789";
std::copy(s.begin(), s.end(), std::ostream_iterator<char>(std::cout, " "));
std::cout << std::endl;
std::copy(s.rbegin(), s.rend(), std::ostream_iterator<char>(std::cout, " "));
std::cout << std::endl;
}
avl@axp3:~$ g++ demo.cpp
avl@axp3:~$ ./a.out
0 1 2 3 4 5 6 7 8 9
avl@axp3:~$ ./a.out | od -h
0000000 2030 2031 2032 2033 2034 2035 2036 2037
0000020 2038 2039 0a0a
0000026
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29696