Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: utzoo!mnetor!seismo!lll-crg!ames!ucbcad!ucbvax!decvax!decwrl!pyramid!gould9!scubed!piaget!jc
From: jc@piaget.UUCP (John Cornelius)
Newsgroups: comp.lang.c,comp.std.internat
Subject: Re: draft ANSI standard:  one change that would *really* help Europe
Message-ID: <137@piaget.UUCP>
Date: Fri, 12-Dec-86 21:35:17 EST
Article-I.D.: piaget.137
Posted: Fri Dec 12 21:35:17 1986
Date-Received: Mon, 15-Dec-86 22:46:42 EST
References: <1382@hoptoad.uucp> <8322@lll-crg.ARpA> <2221@eagle.ukc.ac.uk> <300@bms-at.UUCP> <2246@eagle.ukc.ac.uk>
Reply-To: jc@piaget.UUCP (John Cornelius, System Manager)
Organization: International Widget
Lines: 35
Xref: mnetor comp.lang.c:368 comp.std.internat:44

In article <2246@eagle.ukc.ac.uk> sjl@ukc.ac.uk (S.J.Leviseur) writes:
 >In article <300@bms-at.UUCP> stuart@bms-at.UUCP (Stuart D. Gathman) writes:
 >>In article <2221@eagle.ukc.ac.uk>, sjl@ukc.ac.uk (S.J.Leviseur) writes:
 >....
 >>> If you want to see for yourself have a look through your sources and find
 >>> every occurence of a comparision between EOF or -1, and a char. Typically,
 >>> where cp is a character pointer:-
 >>
 >>> 		if (*cp == EOF)
 >>
 >>> 		while (*cp != EOF)
 >>
 >>Not in our code!  This type of code is not likely to work, even under K & R.
 >
 >It will work on any machine that allows signed chars (despite being ideologically
 >unsound!)
 >

I believe that the 3B2, to pick an example, places char in the high order
byte of the register.  If you test one for equality with (int) -1 you will
never pass the test.

As for small integers, Whitesmiths had a convention where a signed char
was typdef tiny char (in this case signed). 

Because of the different architectures we're seeing in the Unix/C environment
I laud the effort to create a standard that is architecture independent.

As for the above construct working on any machine with signed char, I doubt
that it will work on the 3B2.


-- 
John Cornelius
(...!sdcsvax!piaget!jc)