public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* libstdc++/10578: std::getline not stripping \r
@ 2003-05-01 12:56 bdawes
  0 siblings, 0 replies; 2+ messages in thread
From: bdawes @ 2003-05-01 12:56 UTC (permalink / raw)
  To: gcc-gnats


>Number:         10578
>Category:       libstdc++
>Synopsis:       std::getline not stripping \r
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu May 01 12:56:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     Beman Dawes, John Maddock
>Release:        unknown-1.0
>Organization:
>Environment:
GCC 3.2.3 on Win32
>Description:
Beman Dawes reports:

I've just upgraded GCC from 3.2.1 to 3.2.3 for Win32 regression testing, and regex_timer had to be killed manually because it was looping.

Same results on a second machine.

John Maddock reports:

I have the same problem: it appears to be a bug in libg++ std::getline: the lines are being returned with a trailing \r on the end of each line - stripping all the \r's from the input text file used by that test fixes the issue.

[This is the Boost regex_timer regression test being discussed.]

--Beman
>How-To-Repeat:

>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


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

* Re: libstdc++/10578: std::getline not stripping \r
@ 2003-05-01 13:42 paolo
  0 siblings, 0 replies; 2+ messages in thread
From: paolo @ 2003-05-01 13:42 UTC (permalink / raw)
  To: bdawes, gcc-bugs, gcc-prs, nobody, paolo

Synopsis: std::getline not stripping \r

Responsible-Changed-From-To: unassigned->paolo
Responsible-Changed-By: paolo
Responsible-Changed-When: Thu May  1 13:42:14 2003
Responsible-Changed-Why:
    Analyzed.
State-Changed-From-To: open->feedback
State-Changed-By: paolo
State-Changed-When: Thu May  1 13:42:14 2003
State-Changed-Why:
    Hi. According to 21.3.7.9,10 getline(istream, string) uses
    '\n' as delimiter, whereas windows textfile are terminated
    by "\r\n". Therefore, it looks like regex_timer should
    use instead getline(istream, string, '\r') on windows
    platforms.
    Thoughts?
    Thanks,
    Paolo.

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


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

end of thread, other threads:[~2003-05-01 13:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-05-01 12:56 libstdc++/10578: std::getline not stripping \r bdawes
2003-05-01 13:42 paolo

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