X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-2.9 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org To: cygwin AT cygwin DOT com From: Vin Shelton Subject: New gcc-4 compile error w/getc and isspace Date: Sun, 08 Nov 2009 23:43:41 -0500 Lines: 48 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Consider this module: #include #include void tst(FILE *fp) { int c; while ( isspace(c = getc(fp)) ) ; return; } gcc-4 -c t2.c t2.c: In function ‘tst’: t2.c:9: error: lvalue required as left operand of assignment I'm pretty sure this module used to compile successfully under gcc-4, but I recently rebuilt my machine, so something may have changed in the configuration. gcc-3 compiles the module without complaint. gcc-4 will compile this version: #include #include void tst(FILE *fp) { int c; //while ( isspace(c = getc(fp)) ) while ( c = getc(fp) && isspace(c) ) ; return; } Did something recently change in the ctype.h or stdio.h header files to cause this? Regards, Vin -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple