Nathan Neulinger
Thu Apr 12 10:54:00 GMT 2001

What's the status on this? I have yet to hear much of anything back on
this bug report, and it is 100% reproducible every time I build gcc on
solaris 2.6 or 2.7.

I'm referring to my bug report about cin.getline not functioning
properly on solaris, where it requires hitting enter more than once, and
only reading a single character of the typed (or piped) in string.

The .ii and other files were attached to the bug report.

I am running the latest (03/20/01) cvs for the 3.0 branch. The following
                 code does not work properly on solaris builds. You have
to hit enter twice,
                 and it only gets the first character of the entered

                 #include <iostream.h>
                 int main() {
                 char str[50];
                 while (cin.getline(str,40))
                 cout << "string = \"" << str << "\"" << endl;

                 ---run on sol 2.7---
                 arstest(37)> ./getln 

                 string = "f"


                 ---run on sol 2.7 piped---
                 arstest(40)> echo fred | ./getln
                 string = "f"

                 ---run on linux and any other box---
                 string = "fred"

                 I have this problem on sol 2.6, sol 2.7, but not on
HP-UX 10.20, 11.X, or

                 GCC is built with binutils, with the
following options:

                 # This file was generated automatically by configure.
Do not edit.
                 # This directory was configured as follows:
                 --host=sparc-sun-solaris2.7 -
                 d --disable-nls --disable-checking --disable-shared
                 ion-specific-runtime-libs --norecursion 
                 # using "mh-frag"

                 I believe this was reported fixed in bug number 1620,
but it still occurs
                 for me, and from the looks of the bug report, was also
still occuring for
                 the person who reported it then but the problem was
closed regardless.

                 Any suggestions? I've attached the .ii.bz2 file.

                 I will be more than happy to provide access to my
systems to debug this, as there
                 is no way I can put 3.0 into production if this is
still broke when 3.0 is released. Right
                 I can barely get people to test the snapshot, since
such a basic function doesn't
                 work right.

-- Nathan

Nathan Neulinger                       EMail:
University of Missouri - Rolla         Phone: (573) 341-4841
Computing Services                       Fax: (573) 341-4216

More information about the Gcc-bugs mailing list