public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* libstdc++/2970: complex inserter with extraneous 'ends'
@ 2001-05-26 22:36 theonetruekenny
  0 siblings, 0 replies; only message in thread
From: theonetruekenny @ 2001-05-26 22:36 UTC (permalink / raw)
  To: gcc-gnats; +Cc: kenny.simpson

>Number:         2970
>Category:       libstdc++
>Synopsis:       complex inserter with extraneous 'ends'
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat May 26 22:36:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     theonetruekenny@yahoo.com
>Release:        cvs gcc 5-26-2001
>Organization:
>Environment:
Looking at source code...
>Description:
In the implementation of operator<< for complex<>, there appears to be an extraneous 'ends'.

In line 86 of complex_io.cc is this line:
__s << '(' << __x.real() << "," << __x.imag() << ')' << ends;

This will actually write "(x,y)\0" to the stringbuffer, then the same to the output stream.  This bug was most likely being hidden by bug #2830.

Also note that this 'ends' does not appear in the Standard (or at least the last public draft) in 26.2.6.
>How-To-Repeat:
Observe line 86 of complex_io.cc
>Fix:
remove " << ends" from the line of code.
>Release-Note:
>Audit-Trail:
>Unformatted:


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2001-05-26 22:36 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-05-26 22:36 libstdc++/2970: complex inserter with extraneous 'ends' theonetruekenny

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