c++/2052: gcc 3.0 fails to recognize cout << flush;
Robert Boehne
rbo@localhost.localdomain
Wed Feb 21 10:06:00 GMT 2001
>Number: 2052
>Category: c++
>Synopsis: gcc 3.0 fails to recognize cout << flush;
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: unassigned
>State: open
>Class: rejects-legal
>Submitter-Id: net
>Arrival-Date: Wed Feb 21 10:06:01 PST 2001
>Closed-Date:
>Last-Modified:
>Originator: Robert Boehne
>Release: 3.0 20010220 (prerelease)
>Organization:
Ricardo Software
>Environment:
System: Linux icarus 2.2.16-3 #1 SMP Tue Jan 16 18:58:01 CST 2001 i686 unknown
Architecture: i686
host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: i686-pc-linux-gnu
configured with: /icarus/gcc/configure --srcdir=/icarus/gcc --prefix=/icarus/bu-snap --enable-threads --with-gnu-as --with-gnu-ld --enable-shared
>Description:
When compiling the following source via CodeSourcery web interface an
error is thrown for line six " << flush;" is not recognized by the
compiler as it should be. cout.flush(); is properly recognized.
test-source--
#include <iostream.h>
main(){
int aToken2 = 40;
cout << "'\t Value = '" << aToken2 << "'" << endl;
cout.flush();
cout << "'\t Value = '" << aToken2 << "'" << endl << flush;
return;
}
end-test-source--
>How-To-Repeat:
Compile the above code via the on-line compiler.
>Fix:
Work-around is to use cout.flush() rather than cout<<flush;
I'm not a compiler guy, so I can't say where the problem is.
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the Gcc-bugs
mailing list