This is the mail archive of the gcc-prs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

libstdc++/2720: cin input truncated if istream.clear() used in cases on "ind" and "ix" only



>Number:         2720
>Category:       libstdc++
>Synopsis:       cin input truncated if istream.clear() used in cases on "ind" and "ix" only
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed May 02 19:16:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Jeff Carlson
>Release:        gcc 2.95-3 20010315 (release)
>Organization:
>Environment:
RH 7.1, not standard RH7.1 gcc, that was 2.96-81, but rather the standard release as noted above.
>Description:
Read a file and strings beginning with "ind" or "Ind" are truncated (e.g., "Indigo" is read as "igo") and strings beginning with "ix" where x is any letter except 'n', and the first two characters are dropped (e.g., "Ivy" is read as "y".  See attached source file and input file.  

This only occurs on Linux 2.95.3 and 2.96-81.  This problem does not occur with cygwin 2.95.3-2.

Also you can see that on the lines before the I* strings, the last value seems to be read twice if you compare the input with the output.
>How-To-Repeat:
$ g++ readnames.cpp -o readnames
$ ./readnames < names.lst

>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/x-gzip-compressed; name="cin_bug.tar.gz"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="cin_bug.tar.gz"

H4sIAGy88DoAA+2Uy27bMBBFvRW/4gIFHAsIAlJ+tZEhoIsukkX/QZXohKlMpXq4CQL/e4dkYqsG
ii4CO5s5kE1yZjhzRyZt841ur6q2G50OqaRczGYjKaVazqUf6XGjR7n5MlnO1JQe8qtkmixGkCfU
tKdvu7wBRkXeVG1tH9b/iPteW30OPWfmVq/XUEjEjS3NXY0pZuI2L371GnMsxNetbp6xxGeIm+0z
vkBJ8W2jG3pTUAoqER/dAPMuGp2X1v8HFI+PJ6rxn/uv5CLZ3/8koTg1VfM53/9z8MnYoupLjZWp
245OwyYTBxtZjL0bWra66OomE6JvyYO2K6+vC2PTiBia6r4j2zBK27JK/44K6dNhVMifCmGCmjHc
CU0m+6VpLxGCVmXd/6h0NsZDb39OY/EiALPGhGIQ09ytEZxXRaXzZhKnIgq78ETT3/eGZj4+y/BE
m6IXEQFOPVYrstDXBS4odCci0x6yADv6NLrrG0vbU7E7UjwQbC8RGh3D3bRXndaVdGvqFUcdBc2p
r+Ca9zm8DXE6qGtDXdthkxs7CZlDrdfUwFuPXhQKl8m5EA9e0Vu/3kGj/6mcw/d5KChdvY8+sQzD
MAzDMAzDMAzDMAzDMAzDMAzDMAzDHPMHAL71wAAoAAA=


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]