Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!dali.cs.montana.edu!ogicse!intelhf!ichips!iwarp.intel.com!inews!nevin!bhoughto From: bhoughto@nevin.intel.com (Blair P. Houghton) Newsgroups: comp.lang.c Subject: Re: One more point regarding = and == (more flamage) Message-ID: <3646@inews.intel.com> Date: 4 Apr 91 04:23:46 GMT References: <3555@inews.intel.com> <3465@litchi.bbn.com> <29444:Mar3120:23:3491@kramden.acf.nyu.edu> Sender: news@inews.intel.com Organization: Intel Corp, Chandler, AZ Lines: 24 In article <29444:Mar3120:23:3491@kramden.acf.nyu.edu> brnstnd@kramden.acf.nyu.edu (Dan Bernstein) writes: >In article <3465@litchi.bbn.com> rsalz@bbn.com (Rich Salz) writes: >> In <3555@inews.intel.com> bhoughto@hopi.intel.com (Blair P. Houghton) writes: >> >toupper.c: while ( (int) (c = getchar()) != EOF ) >> The cast implies that c is char. If so, this line is buggy. > >Maybe it's long? :-) No, actually it's a quad double pointer to a function returning a far union of wchar_t and an odd-length bit field. It's also several years old and the cast was inserted to shut lint up, not to fix the bad conversion, which deserves while ( ( c = (char) getchar() ) != (char)EOF ) or, if you prefer, int i; while ( ( i = getchar() ) != EOF ) c = (char)i; --Blair "Call For Votes: comp.lang.c.kludges.just.to.shut.lint.up"