public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c++/9042: Initialisation of std::ostringstream does not work correctly
@ 2002-12-23  9:35 paolo
  0 siblings, 0 replies; 2+ messages in thread
From: paolo @ 2002-12-23  9:35 UTC (permalink / raw)
  To: O.Kullmann, gcc-bugs, gcc-prs, nobody, paolo

Synopsis: Initialisation of std::ostringstream does not work correctly

Responsible-Changed-From-To: unassigned->paolo
Responsible-Changed-By: paolo
Responsible-Changed-When: Mon Dec 23 09:35:53 2002
Responsible-Changed-Why:
    Analyzed.
State-Changed-From-To: open->closed
State-Changed-By: paolo
State-Changed-When: Mon Dec 23 09:35:53 2002
State-Changed-Why:
    Cannot be reproduced with gcc-3.2.1, neither with 3.3 pre
    or 3.4 exp.
    Thanks, Paolo.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=9042


^ permalink raw reply	[flat|nested] 2+ messages in thread

* c++/9042: Initialisation of std::ostringstream does not work correctly
@ 2002-12-23  7:56 O.Kullmann
  0 siblings, 0 replies; 2+ messages in thread
From: O.Kullmann @ 2002-12-23  7:56 UTC (permalink / raw)
  To: gcc-gnats


>Number:         9042
>Category:       c++
>Synopsis:       Initialisation of std::ostringstream does not work correctly
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          wrong-code
>Submitter-Id:   net
>Arrival-Date:   Mon Dec 23 07:56:29 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     Oliver Kullmann
>Release:        g++ -v
>Organization:
>Environment:
Linux, Suse 8.0
 g++ -v
Reading specs from /opt/experimental/lib/gcc-lib/i486-suse-linux/3.0.4/specs
Configured with: ../configure --enable-threads=posix --enable-long-long --prefix=/opt/experimental
+--with-local-prefix=/usr/local --enable-languages=c,c++,f77,objc,java --disable-nls --enable-shared
+i486-suse-linux
Thread model: posix
gcc version 3.0.4 (SuSE)
>Description:
#include <sstream>
#include <iostream>

int main() {
  std::ostringstream s("abcd", std::ios_base::app);
  s << "xy";
  std::cout << s.str() << "\n";
  // outputs "xycd" (instead of the correct "abcdxy")
}
>How-To-Repeat:
compile and run;
>Fix:
Use only the default constructor of std::ostringstream,
and then use the inserter.
>Release-Note:
>Audit-Trail:
>Unformatted:
 Reading specs from /opt/experimental/lib/gcc-lib/i486-suse-linux/3.0.4/specs
 Configured with: ../configure --enable-threads=posix --enable-long-long --prefix=/opt/experimental
 +--with-local-prefix=/usr/local --enable-languages=c,c++,f77,objc,java --disa


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-12-23 17:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-12-23  9:35 c++/9042: Initialisation of std::ostringstream does not work correctly paolo
  -- strict thread matches above, loose matches on Subject: below --
2002-12-23  7:56 O.Kullmann

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).