Article View: comp.bugs.sys5
Article #451Re: chars in conditional expression, 3b2 C compiler
From: Doug Gwyn
Date: Mon, 05 Jan 1987 18:00
Date: Mon, 05 Jan 1987 18:00
11 lines
1144 bytes
1144 bytes
In article <189@olamb.UUCP> kimcm@olamb.UUCP (Kim Chr. Madsen) writes: -The only thing that really bugs me is the fact that chars are unsigned -and therefore the following code will fail: - while ((c=getc(stream)) != EOF) putchar(c); -And you will have to redefine EOF to 255 (0377 or 0xff) or cast it to a char! I suspect there will be a zillion follow-ups explaining that getc() returns an (int), not a (char), and that EOF should remain defined as -1. This has been hashed over many times in net.lang.c. It is not a bug in the 3B2 C implementation.
Technical Details
Message-ID:
<5474@brl-smoke.ARPA>Path:
arc1-ca.pugleaf.net!utzoo!mnetor!seismo!brl-adm!brl-smoke!gwynReferences:
<2489@sdsu.UUCP> <189@olamb.UUCP>Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!brl-adm!brl-smoke!gwyn From: gwyn@brl-smoke.ARPA (Doug Gwyn ) Newsgroups: comp.bugs.sys5 Subject: Re: chars in conditional expression, 3b2 C compiler Message-ID: <5474@brl-smoke.ARPA> Date: Mon, 5-Jan-87 13:00:13 EST Article-I.D.: brl-smok.5474 Posted: Mon Jan 5 13:00:13 1987 Date-Received: Mon, 5-Jan-87 21:59:04 EST References: <2489@sdsu.UUCP> <189@olamb.UUCP> Reply-To: gwyn@brl.arpa (Doug Gwyn (VLD/VMB) <gwyn>) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 11