Path: utzoo!telly!ddsw1!lll-winken!killer!osu-cis!tut.cis.ohio-state.edu!YALE.ARPA!galvin-peter From: galvin-peter@YALE.ARPA (Peter Baer Galvin) Newsgroups: gnu.gcc.bug Subject: Problem with gcc 1.27 Message-ID: <8809221359.AA19149@ELI.CS.YALE.EDU> Date: 22 Sep 88 13:59:58 GMT Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 51 Under 1.27, a user reports that the first example from the new K&R fails to run correctly when compiled with debugging turned on. I understand that 1.28 is now availale...would that solve the problem? Here is the original message from the user: From: Stan EisenstatDate: Thu, 22 Sep 88 03:23:07 EDT The following program is from K&R/2E: #include main() { int c; c = getchar(); while (c != EOF) { putchar(c); c = getchar(); } } When compiled as gcc x.c -o x or gcc -g x.c -o x it does not work correctly, seemingly printing only the first character in each block! With compiled with optimization, it runs correctly. Suggestions? --Stan- ------- Thanks for your help. Also, I just wanted to verify that there is no lint that will correctly check gcc input. Is that true? --Peter ------------------------------------------ -------------------------------- Peter Baer Galvin (203)432-1254 Senior Systems Programmer, Yale Univ. C.S. galvin-peter@cs.yale.edu 51 Prospect St, P.O.Box 2158, Yale Station ucbvax!decvax!yale!galvin-peter New Haven, Ct 06457 galvin-peter@yalecs.bitnet