From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29810 invoked by alias); 6 Aug 2007 04:45:44 -0000 Received: (qmail 26175 invoked by uid 48); 6 Aug 2007 04:45:24 -0000 Date: Mon, 06 Aug 2007 04:45:00 -0000 Subject: [Bug c++/33000] New: cin fails to allow input to be entered X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "vanemden at cs dot uvic dot ca" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2007-08/txt/msg00317.txt.bz2 linuxthing$g++ -v Reading specs from /usr/lib/gcc/x86_64-redhat-linux/3.4.6/specs Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --disable-checking --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-java-awt=gtk --host=x86_64-redhat-linux Thread model: posix gcc version 3.4.6 20060404 (Red Hat 3.4.6-3) more main.c #include using namespace std; int main() { cout << "Input in hex two integers x and y." << endl; int x, y; cin >> hex >> x >> y; } linuxthing$more makefile run: prog ./prog prog: main.o g++ -o prog main.o # gcc -o prog main.o -lm # -lm option to ensure sqrt gets included from math lib main.o: main.c g++ -c -Wall main.c # gcc -c -ansi -pedantic -Wall main.c # gcc -c -Wall main.c clean: rm -f main.o rm -f prog linuxthing$make run ./prog Input in hex two integers x and y. aaaaaaaa linuxthing$ ----------------- This shows the failure to allow input. Below follows the intended behaviour as given by an earlier version of g++ ----------------- yang$g++ -v Reading specs from /package/gcc-2.95.2/lib/gcc-lib/sparc-sun-solaris2.8/2.95.2/specs gcc version 2.95.2 19991024 (release) yang$more main.c #include using namespace std; int main() { cout << "Input in hex two integers x and y." << endl; int x, y; cin >> hex >> x >> y; } yang$ run: prog ./prog prog: main.o g++ -o prog main.o # gcc -o prog main.o -lm # -lm option to ensure sqrt gets included from math lib main.o: main.c g++ -c -Wall main.c # gcc -c -ansi -pedantic -Wall main.c # gcc -c -Wall main.c clean: rm -f main.o rm -f prog yang$make run g++ -c -Wall main.c g++ -o prog main.o ./prog Input in hex two integers x and y. aaaaaaaa bbbbbbbb yang$ -- Summary: cin fails to allow input to be entered Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: vanemden at cs dot uvic dot ca GCC build triplet: gcc version 3.4.6 20060404 (Red Hat 3.4.6-3) GCC host triplet: linux.cs.uvic.ca GCC target triplet: linux.cs.uvic.ca http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33000